user4911648
user4911648

Reputation:

What does *Restarting data prefetching from start* mean in caffe

I have been reading up on the log output Restarting data prefetching from start. Apparently, it means that one has not enough data and the data is prefetched* from the start. However, my dataset exists of 10.000 data samples and my batch size is 4. How is it possible that it has to prefetch the data, since my batch size is 4 which means it will take 4 data samples per iteration. Can anyone clarify my understanding?

LOG:

I0409 20:33:35.053406 20072 data_layer.cpp:73] Restarting data prefetching from start.
I0409 20:33:35.053447 20074 data_layer.cpp:73] Restarting data prefetching from start.
I0409 20:33:40.320605 20074 data_layer.cpp:73] Restarting data prefetching from start.
I0409 20:33:40.320598 20072 data_layer.cpp:73] Restarting data prefetching from start.
I0409 20:33:45.591019 20072 data_layer.cpp:73] Restarting data prefetching from start.
I0409 20:33:45.591047 20074 data_layer.cpp:73] Restarting data prefetching from start.
I0409 20:33:49.392580 20034 solver.cpp:398]     Test net output #0: loss = nan (* 1 = nan loss)
I0409 20:33:49.780678 20034 solver.cpp:219] Iteration 0 (-4.2039e-45 iter/s, 20.1106s/100 iters), loss = 54.0694
I0409 20:33:49.780731 20034 solver.cpp:238]     Train net output #0: loss = 54.0694 (* 1 = 54.0694 loss)
I0409 20:33:49.780750 20034 sgd_solver.cpp:105] Iteration 0, lr = 0.0001
I0409 20:34:18.812854 20034 solver.cpp:219] Iteration 100 (3.44442 iter/s, 29.0325s/100 iters), loss = 21.996
I0409 20:34:18.813213 20034 solver.cpp:238]     Train net output #0: loss = 21.996 (* 1 = 21.996 loss)

Upvotes: 8

Views: 6654

Answers (1)

Shai
Shai

Reputation: 114866

If you have 10,000 samples and you process them in batches of size 4, it means that after 10,000/4=2,500 iterations you will process all your data and caffe will start over reading the data from the beginning.
BTW, going over all samples once is also referred to as an "epoch".

After every epoch caffe will print to the log

Restarting data prefetching from start

Upvotes: 6

Related Questions