Thanks for the quick reply, I didn’t reply to you directly as I know your busy. I am happy that sgugger’s dealing with it. I am also happy that it is actually is an issue and not just my lack of understanding. If my coding skills were better I would fix it myself, but I think I am a little way from that yet.
My only concern is that for the new starters to fastai deploying their first ML app, is probably one of the highlights of their learning year, it was for me anyway.
Once things get less hectic on my end I plan on deploying (at least most) of the models we wind up building. I’ve had thoughts on deploying Maybe on GitHub pages (if they do FTP/interactions) and tagging in an s3 bucket request or something (if it can’t be done on pages manually) for doing predictions. But I do plan on eventually getting to this and tackling it. (Not saying it will be soon)
Multimodal models and Kaggle (Bengali.AI) (may need to take this down… looking at the rules, I posted it on the Kaggle discussion forum as well so I think we’re okay, if anyone is more familiar with Kaggle tell me if there is anything else I need to do or if it’s not allowed at all)
Those notebooks are all live (minus Unet, will be done soon), I’ll be working on the Lesson 7 Notebooks this week and then that’ll be it for the vision block
Lesson 7 will consist of:
SuperResolution
Audio
Siamese Dataloader
For those wanting more GAN, there is a Wassertein GAN example in the course subdirectory here (LSUNS)
@mrfabulous1, thank you so much for your detailed reply! Two more questions:
In your response, you have mentioned " I would suggest you complete the production part of the notebook and create a .pkl file for your model" . Prodiction part of which notebook?
I am thinking of using fastai v1 for now, but I am having difficulty installing it on a CPU only machine. Can you please take a look at the post here: Fastai v1 install issues thread
I had assumed the latter part of the “Custom” notebook but upon further inspection… we never exported the model to get the PKL! Oops (my bad!). So to do so, do learn.export('myModel') and it will show up as myModel in the content panel on colab. (this is shown in the beginning of L2 I think if not I know it’s in the style transfer lesson)
However that is shown on the tail end of the lesson2-download notebook on the fastai2 repo:
So “Animal” would be 0, Archway “1”… and so on. Is there a way to change this? i.e. my food categories have other ids so I would like to pass to fastai the correct pairs e.g. corn “1234”, bread “6543”, popcorn “7654”. Is there a way to pass this dictionary?
A workaround would be to go with it and then update the mask to the correct ids but it feels to me as very inefficient.
@mgloria i wanted to clarify - you are currently training with non continuous codes ?
for some reason i thought the codes needed to be continuous. That’s why i wanted to check thanks
Regarding your question i feel i’m missing something, you currently have corn : “1234” but you want to change that to corn : “1” ? That means you have to change your mask values ?
in style transfer why are we doing .eval ? feat_net = vgg19(pretrained=True).features.cuda().eval()
from my understanding .eval is used for changing behaviour of bn and dropout layers, with vgg19, vgg16 we don’t have those layers in the feature extractor. Is this added just as a safety measure when we add an arch that has one of those layers ?
Also! On a related note between model.eval() and with torch.no_grad(), I was curious if the difference (because I thought it was the same). It’s not!
model.eval() will notify all your layers that you are in eval mode, that way, batchnorm or dropout layers will work in eval mode instead of training mode . torch.no_grad() impacts the autograd engine and deactivate it
adding to that : model.train() and model.eval() do not change any behavior of the gradient calculations, but are used to set specific layers like dropout and batchnorm to train or evaluation mode (dropout won’t drop activations, batchnorm will use running stats instead of batch stats).
Yes, occasionally I’d get CUDA issues. It’s probably due to the original image size, restarting a few times seemed to help. Unsure to why it’s needed though.
And yes, it’s a terminal command the only bit we care about is the GPU were using