Trouble training the model: dogs vs cats


#1

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.


Wiki: Lesson 1
(Tal) #2

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


(Laurens Geffert) #3

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


(Tal) #4

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


(Andreas Daiminger) #5

Yes! This did the job!


(Andy Bell) #6

thank you! fixed it for me too!


#7

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.


(Mayank Goyal) #8

Fixed the bug for me as well :slight_smile:


(Rohit Rudrapatna) #9

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


(Rohit Rudrapatna) #10

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