Thanks for Learner
. Is this the right usage of callback ? Also how to use multiple callbacks ?
You can use multiple callbacks by sending a list of callbacks to the callbacks
argument when defining the Learner.
But some callbacks require learn
object to be passed on to them like ReduceLROnPlateau
or SaveModelCallback
, so a list of callbacks may not work in those cases ?
You can either pass the learn object or use the callback_fns
argument to pass a list of callbacks in, wrapped in the partial
function, like this:
learn = create_cnn(data, models.resnet34, metrics=error_rate, callback_fns=[partial(ReduceLROnPlateauCallback, monitor='val_loss', mode='auto', patience=0, factor=0.2, min_delta=0), partial(SaveModelCallback, monitor='val_loss', mode='auto', every='improvement', name='bestmodel')])
First of all, I want to say thank you to Jeremy and all the fast.ai community. I just get a first job as a machine learning engineer . This course and this forum help me a lot on getting knowledge in machine learning and persisting with my choice.
I will work with action recognition from multi cameras (for ex: recognize people putting thing in a cart) . And by the way, I want to ask if someone have experience on this problem ? With fast.ai ?
Thank you so much in advance,
Trying to make my first PR request for a small typo in the docs (start small!), but am I right in thinking that this commit makes these instructions on how to contribute to the docs out-of-date, as there now is no folder docs_src in fastai_docs?
thank you! btw, do you know if fastai is beta version or alpha?
Our IT “requires” “beta” version.
Not sure. Did you try deleting course v3 folder and cloning it again?
Can anyone explain this:
Is something badly wrong or is that not a problem? This was after running resnet50 on my dataset of dog images (to solve the ever-important problem of classifying huskies, American Eskimos and miniature dachshunds…). If it helps explain this, I ran for 24 epochs with max_lr=0.001 and got what seems to be good output:
I got a basically similar strange lr plot using resnet34, so it’s not the model.
Any ideas?
thanks!
How much increment in training time does callback add approximately like ReduceLROnPlateau
? Any idea ?
Just wanted to make clear, does create_cnn
only works with models defined in fastai, what other functionalities does it hold over Learner
? I mean we can use the same models with Learner
as well.
…and I have an answer for the weird lr plot! Duh: first run learn.lr_find(), then run the plot… now I get something more rational (a single-valued function as I think we used to say in math class).
This is very well documented in the docs. You should take a look and tell us what you learned!
Thanks @miwojc. That is a great idea. I figured it out after awhile. I was sharing my data drive between linux and windows and it was not set up to read-write in Linux. I appreciate the suggestion!
Pete
Hi,
I would like to know how get_transforms() method works in detail.
Providing the link to the repository [https://github.com/fastai/fastai/blob/master/fastai/vision/transform.py]
1.What are affines and why it is used?
2.How changing brightness,contrast,cropping or zooming would help in satellite images,for example finding water resources.It can be any use case.
Just need a basic explanation of how this is used to manipulate images.Does this manipulation correlate to higher accuracy?
Also, How does this transformation techniques correspond to this paper[http://cs231n.stanford.edu/reports/2017/pdfs/300.pdf]
Thanks!
get_transform() generating nested lists of predefine augmentations, the first list of transformation for training second element transformation for validations sets.
Best starting point
https://github.com/fastai/fastai_docs/blob/master/docs_src/vision.transform.ipynb
The whole idea of transformations is to generate extra data from existing data similar to real data.
for instance, you won’t flip cat horizontally as this would be unrealistic
Cheers
Michal
fastai v1 is the beta version. So, there shouldn’t be any issues installing the current version.
Is there any way we can use generator with ImageDataBunch
?
I am currently working on a project that would make live predictions from the webcam. For this I am using opencv and fastai’s library. The problem occurs when I try to create web-app of it. Whenever I place import cv2
and import fastai
along with from flask import Flask
I get following error:
keyur@:/My Projects$ FLASK_APP=webapp.py flask run
* Serving Flask app "webapp.py"
* Environment: production
WARNING: Do not use the development server in a production environment.
Use a production WSGI server instead.
* Debug mode: off
Segmentation fault (core dumped)
Whenever I try to comment out import fastai
and just use import cv2
then I get dont get any error apart from the keywords which are present in fastai library e.g. ImageDataBunch not found
. What might be the cause of this error any ideas?
Do we need to train our model again after cleaning up after dataset?