fast-ai

How to get add aditional transform to get_transform in fastai?

谁说我不能喝 提交于 2021-02-10 05:42:07
问题 I would like to add aditional augmenmentation this way: additional_aug=[zoom_crop(scale=(0.75,1.25), do_rand=False), brightness(), contrast() ] tfms = get_transforms(do_flip=True,flip_vert=True,max_lighting=0.2, xtra_tfms=additional_aug) data = (ImageList.from_df(df=df,path='./',cols='path') .split_by_rand_pct(0.2) .label_from_df(cols='diagnosis',label_cls=FloatList) .transform(tfms,size=sz,resize_method=ResizeMethod.SQUISH,padding_mode='zeros') .databunch(bs=bs,num_workers=4) .normalize

I can't load my model because I can't put a PosixPath

守給你的承諾、 提交于 2020-07-22 05:46:05
问题 I'm setting up a script and I need to use some functions from fast-ai package. The fact is that I'm on Windows and when I define my paths, the function from fast-ai named load_learner can't load the model. I've tried to change the function into the package as: state = pickle.load(open(str(path) + '/' + str(fname), 'rb')) instead of: state = pickle.load(open(path/fname, 'rb')) but I obtain this error: File "lib\site-packages\fastai\basic_train.py", line 462, in load_learner state = pickle.load

Error while applying image augmentation transformations to data in FastAI

半城伤御伤魂 提交于 2020-05-14 18:43:08
问题 I am trying to replicate this kaggle notebook https://www.kaggle.com/tanlikesmath/diabetic-retinopathy-with-resnet50-oversampling on Google Colab. The code was working fine till yesterday but today it is throwing a runtime error. Below is the problematic code: tfms = get_transforms(do_flip=True,flip_vert=True,max_rotate=360,max_warp=0,max_zoom=1.1,max_lighting=0.1,p_lighting=0.5) src = (ImageList.from_df(df=df,path=data_path,cols='path') #get dataset from dataset //ImageItemList threw errors

FastAI lrfind() method doesn’t work properly

那年仲夏 提交于 2020-01-13 04:40:46
问题 Update 1 I updated my lr according to " you want to be 10x back from that point, regardless of slope." and set it to max_lr=-slice(1e-3, 1e-2) And here is what I got And the plots What does this mean? As you can see in the 2nd graph that the loss was very good starting from 1e-08, but I never set my lr to 1e-08, why do I see this?? the loss went up and down between 1e-07 and 1e-04 and eventually it soared to almost 0.05 when the lr came back around 4e-05. What does this mean? Overfitting? How

FastAI lrfind() method doesn’t work properly

巧了我就是萌 提交于 2020-01-13 04:40:11
问题 Update 1 I updated my lr according to " you want to be 10x back from that point, regardless of slope." and set it to max_lr=-slice(1e-3, 1e-2) And here is what I got And the plots What does this mean? As you can see in the 2nd graph that the loss was very good starting from 1e-08, but I never set my lr to 1e-08, why do I see this?? the loss went up and down between 1e-07 and 1e-04 and eventually it soared to almost 0.05 when the lr came back around 4e-05. What does this mean? Overfitting? How

Pytorch installation issue under Anaconda

北慕城南 提交于 2019-12-11 15:19:30
问题 I followed the link here to install fastai library using pip install git+https://github.com/fastai/fastai.git It gave me the following error message. These messages keep the same even I installed Pytorch successfully using conda install pytorch-cpu -c pytorch and pip3 install torchvision . What can be the reason? Collecting torch<0.4 (from fastai==0.7.0) Using cached https://files.pythonhosted.org/packages/5f/e9/bac4204fe9cb1a002ec6140b47f51affda1655379fe302a1caef421f9846/torch-0.1.2.post1

I get the error while importing the fastai library after install

六眼飞鱼酱① 提交于 2019-12-11 02:29:07
问题 I would like to use the fastai library to perform text processing. First job I installed the fastai library. I used to import it later, but without any code, it only gives an import error. I am using Python 3.5.2 My OS Ubuntu 16.04 asd.py from fastai import * from fastai.text import * output: Traceback (most recent call last): File "/home/ali/Desktop/asd.py", line 2, in <module> from fastai.text import * File "/home/ali/Desktop/env/lib/python3.5/site-packages/fastai/text.py", line 8 re_tok =

is fastai.structured still a part of fast ai library

五迷三道 提交于 2019-12-06 14:46:23
问题 Why i am getting the error fastai.structured is not a module?. i have tried installing previous versions of fastai. but nothing helped. from fastai.imports import * from fastai.structured import * #from pandas_summary import DataFrameSummary from sklearn.ensemble import RandomForestRegressor, RandomForestClassifier from IPython.display import display from sklearn import metrics ModuleNotFoundError Traceback (most recent call last) <ipython-input-17-35432a48f631> in <module>() 1 from fastai