Skip to content

Commit

Permalink
Correct property typo (self.data.path)
Browse files Browse the repository at this point in the history
I got an error when I ran the tutorial code of deep learning 1. It said that self.data_path was not defined, so I looked into learner.py and saw that on the line before this line, there was self.data.path used instead of self.data_path, so I believe that should be corrected.
  • Loading branch information
narudesu authored Apr 30, 2018
1 parent 7d0a033 commit 09b8b92
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fastai/learner.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def __init__(self, data, models, opt_fn=None, tmp_name='tmp', models_name='model
self.clip = None
self.opt_fn = opt_fn or SGD_Momentum(0.9)
self.tmp_path = tmp_name if os.path.isabs(tmp_name) else os.path.join(self.data.path, tmp_name)
self.models_path = models_name if os.path.isabs(models_name) else os.path.join(self.data_path, models_name)
self.models_path = models_name if os.path.isabs(models_name) else os.path.join(self.data.path, models_name)
os.makedirs(self.tmp_path, exist_ok=True)
os.makedirs(self.models_path, exist_ok=True)
self.crit = crit if crit else self._get_crit(data)
Expand Down

0 comments on commit 09b8b92

Please sign in to comment.