Trouble training the model: dogs vs cats

I have quite a bit of experience with Jupyter Notebooks; and through the training of the first model, while instructive, the exercise certainly isn’t very challenging. Nevertheless, I can’t get the training section to run. I get an AttributeError: ‘ConvLearner’ object has no attribute ‘data_path’. I’m at “all stop.” Any help appreciated.

1 Like

Hey,
I think there is a bug in learner.py at line 37

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)

try to replace os.path.join(self.data_path, models_name) with os.path.join(self.data.path, models_name)

i think that should do the trick

5 Likes

Thanks a lot, this solved my problem with it.
Has anybody submitted a pull request for this yet?

Hey Laurens,
Glad I could help, I created a new pull request for this issue :slight_smile:

2 Likes

Yes! This did the job!

thank you! fixed it for me too!

Thanks, Tal. Before i had a chance to try your fix, git pull had it. The learner is working now. I really appreciate the quick response.

Fixed the bug for me as well :slight_smile:

Hi

Thanks for this. I was desperately looking how to solve this problem.

Can anyone tell me how to change the code in the source code?

Rohit

Thanks people. I am really grateful to you. I could fix the problem by : cd fastai
then : git pull

Thanks a ton. Now I can build the model

Rohit