change using self.data_path to self.data.path

using self.data_path in line 37 causes an error: AttributeError: ‘ConvLearner’ object has no attribute ‘data_path’
This commit is contained in:
Tal Hadar
2018-04-30 19:38:52 +03:00
committed by GitHub
parent 7d0a033cec
commit 6492d01e1d

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)