Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export in the wrong place ? #114

Open
Cdk29 opened this issue Jan 29, 2021 · 3 comments
Open

Export in the wrong place ? #114

Cdk29 opened this issue Jan 29, 2021 · 3 comments
Labels
question Further information is requested

Comments

@Cdk29
Copy link
Contributor

Cdk29 commented Jan 29, 2021

I am not 100 % sure it is a bug.

Running code from here : https://github.com/Cdk29/Cassava/blob/main/Xresnet.md

Particularly :

I create the learner using :

learnR <- dataloader %>% cnn_learner(xresnet50(), metrics = accuracy(), model_dir="Xresnet_files/") #prettier

But fastai export it elsewhere :

erolland@erolland-GL75-9SE:~/Bureau$ locate xresnet_50.pkl

/home/erolland/Bureau/Cassava/cassava-leaf-disease-classification/train_images/xresnet_50.pkl

I am not sure but I don't think it is the normal behavior of the export of fastai to use the directory of the training set and not the model_dir to export its model.

@turgut090
Copy link
Member

Could you do the same but with python and see that works as you intended? However, here is the path argument, could specify ur path here, as well? https://github.com/henry090/fastai/blob/a37c463c7ab9494729089924ac0f933439730651/R/image_loaders.R#L368-L373

@Cdk29
Copy link
Contributor Author

Cdk29 commented Jan 29, 2021

Sorry I did not understood, my post was not maybe perfectly clear.

The export is made here :

learnR$export(fname = "xresnet_50.pkl")

Since the learner is created like this :

model_dir="Xresnet_files/")

I expected the exported model to go in the model directory.

@turgut090
Copy link
Member

Yes, I got it. I am not sure why. Could you run this code from the python side? If it works fine (same folder), then I can take a look

@turgut090 turgut090 added the question Further information is requested label Jan 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants