Correct property typo (self.data.path)

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.
This commit is contained in:
Matěj Šmíd
2018-04-30 18:27:48 +02:00
committed by GitHub
parent 7d0a033cec
commit 09b8b92c59

View File

@@ -34,7 +34,7 @@ class Learner():
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)