Skip to content
This repository has been archived by the owner on Jan 7, 2025. It is now read-only.

Fix batch accumulation #1262

Merged
merged 2 commits into from
Nov 16, 2016
Merged

Conversation

lukeyeager
Copy link
Member

Fix #1240

@kostinalexey
Copy link

kostinalexey commented Nov 14, 2016

You need to modify following lines to fix test and display parameters for caffe

542-544, 
-            solver.test_iter.append(int(math.ceil(float(self.dataset.get_entry_count(constants.VAL_DB)) / val_data_layer.data_param.batch_size)))
-            solver.test_iter.append(int(math.ceil(float(self.dataset.get_entry_count(constants.VAL_DB)) / (val_data_layer.data_param.batch_size \* self.batch_accumulation))))

603, 
-                int(math.ceil(5000.0 / train_data_layer.data_param.batch_size))
-                int(math.ceil(5000.0 / (train_data_layer.data_param.batch_size \* self.batch_accumulation)))

772-773
-            solver.test_iter.append(int(math.ceil(float(self.dataset.get_entry_count(constants.VAL_DB)) / val_image_data_layer.data_param.batch_size)))
-            solver.test_iter.append(int(math.ceil(float(self.dataset.get_entry_count(constants.VAL_DB)) / (val_image_data_layer.data_param.batch_size \* self.batch_accumulation))))

828
-                int(math.ceil(5000.0 / train_image_data_layer.data_param.batch_size))
-                int(math.ceil(5000.0 / (train_image_data_layer.data_param.batch_size \* self.batch_accumulation)))

@lukeyeager
Copy link
Member Author

@kostinalexey as far as I can tell, batch accumulation has no effect during the TEST phase. Do you have proof to the contrary?

You're right about the display bug though - thanks! Let me fix that...

@lukeyeager lukeyeager force-pushed the fix-batch-accumulation branch from 4063a1e to 6caa3e4 Compare November 14, 2016 20:48
@kostinalexey
Copy link

You are right, test phase is not effected by batch_accumulation. My mistake.

@lukeyeager lukeyeager force-pushed the fix-batch-accumulation branch from 6caa3e4 to f19a196 Compare November 14, 2016 22:05
@lukeyeager
Copy link
Member Author

No problem at all - thanks for double-checking my work!

@lukeyeager lukeyeager merged commit 80c08ed into NVIDIA:master Nov 16, 2016
@lukeyeager lukeyeager deleted the fix-batch-accumulation branch November 16, 2016 21:37
ethantang95 pushed a commit to ethantang95/DIGITS that referenced this pull request Jul 10, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants