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

Commit

Permalink
Fix batch accumulation TypeError when unset
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeyeager committed May 26, 2016
1 parent b84c569 commit c6eac6a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion digits/model/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@ def validate_py_ext(form, field):
)

batch_accumulation = utils.forms.IntegerField('Batch Accumulation',
default=1,
validators = [
validators.NumberRange(min=1),
validators.Optional(),
Expand Down
2 changes: 1 addition & 1 deletion digits/model/tasks/caffe_train.py
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,7 @@ def save_files_generic(self):

# Batch accumulation
from digits.frameworks import CaffeFramework
if CaffeFramework().can_accumulate_gradients():
if self.batch_accumulation and CaffeFramework().can_accumulate_gradients():
solver.iter_size = self.batch_accumulation

# Epochs -> Iterations
Expand Down

0 comments on commit c6eac6a

Please sign in to comment.