Skip to content

Commit

Permalink
Fix use of non-common dataset interface in generic models
Browse files Browse the repository at this point in the history
The common dataset interface exposes a get_mean_file() method to retrieve the mean file.
Using the dataset.mean_file attribute only works for "images/generic" datasets.
This should have been changed in NVIDIA#723
  • Loading branch information
gheinrich committed May 27, 2016
1 parent 4bf8cb1 commit ab5c72b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions digits/model/images/generic/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ def download_files(self, epoch=-1):
download_files = [(self.path(filename), os.path.basename(filename))
for filename in model_files.values()]

if task.dataset.mean_file:
if task.dataset.get_mean_file():
download_files.append((
task.dataset.path(task.dataset.mean_file),
os.path.basename(task.dataset.mean_file)))
task.dataset.path(task.dataset.get_mean_file()),
os.path.basename(task.dataset.get_mean_file())))

# add snapshot
download_files.append((snapshot_filename,
Expand Down

0 comments on commit ab5c72b

Please sign in to comment.