I have a TitanX GPU (~12GB). My model takes 8GB for training phase and 6GB for the testing phase. I want to perform testing phase after each 100 iterations. Hence, my setting prototxt is
train_net: "train.prototxt"
test_net: "val.prototxt"
test_iter: 100
test_interval: 100
The problem is that the Caffe takes 8GB for training and it does not free the space when performing testing phase, hence my memory is not enough (total 15GB).
Do we have any setting in prototxt to handle the problem? Thanks
The error looks like
I0411 16:41:04.669823 6823 solver.cpp:331] Iteration 0, Testing net (#0)
I0411 16:43:31.625444 6823 solver.cpp:398] Test net output #0: intermediate_loss = nan (* 1 = nan loss)
I0411 16:43:31.625897 6823 solver.cpp:398] Test net output #1: loss = nan (* 1 = nan loss)
F0411 16:43:33.259964 6823 syncedmem.cpp:71] Check failed: error == cudaSuccess (2 vs. 0) out of memory