Questions tagged [fast-ai]

Fastai is a deep learning library for Python. It is built on top of PyTorch, and provides high level API to various common deep learning applications and data types.

Fastai is a deep learning library for Python. It is built on top of PyTorch, and provides high level API to various common deep learning applications and data types. For more information see: https://docs.fast.ai or https://github.com/fastai

433 questions
32
votes
2 answers

How to use AMD GPU for fastai/pytorch?

I'm using a laptop which has Intel Corporation HD Graphics 5500 (rev 09), and AMD Radeon r5 m255 graphics card. Does anyone know how to it set up for Deep Learning, specifically fastai/Pytorch?
Mohanned ElSayed
  • 321
  • 1
  • 3
  • 3
16
votes
6 answers

How to display ?

I try to run the below codes but I have a problem in showing the results. also, I use pycharm IDE. from fastai.text import * data = pd.read_csv("data_elonmusk.csv", encoding='latin1') data.head() data = (TextList.from_df(data, cols='Tweet') …
Siamak Abdi
  • 191
  • 1
  • 1
  • 10
15
votes
2 answers

What is the difference between an Embedding Layer with a bias immediately afterwards and a Linear Layer in PyTorch

I am reading the "Deep Learning for Coders with fastai & PyTorch" book. I'm still a bit confused as to what the Embedding module does. It seems like a short and simple network, except I can't seem to wrap my head around what Embedding does…
Peter Bergman
  • 472
  • 4
  • 16
15
votes
4 answers

ModuleNotFoundError: No module named 'fastai'

I'm trying to run the jupyter notebooks of fastai's v3 course. My system has ubuntu 16.04 . Here's what I've done: Installed Python Installed Anaconda Ran conda update conda conda install -c pytorch -c fastai fastai pytorch torchvision…
Ali
  • 261,656
  • 265
  • 575
  • 769
14
votes
7 answers

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

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…
Bando
  • 1,223
  • 1
  • 12
  • 31
12
votes
2 answers

Run inference on CPU using pytorch and multiprocessing

I have trained a CNN model on GPU using FastAI (PyTorch backend). I am now trying to use that model for inference on the same machine, but using CPU instead of GPU. Along with that, I am also trying to make use of multiple CPU cores using the…
10
votes
1 answer

Fastai - how to prediction after use load_learner in cpu

I'm doing a Text Classification (NLP) model using fastai train on googlecolab (gpu) after I load the model using load_learner without any error but when I change the cpu usage, I get an error "RuntimeError: _th_index_select not supported on CPUType…
Trien Tran
  • 394
  • 1
  • 7
9
votes
2 answers

Choosing the learning_rate using fastai's learn.lr_find()

I am going over this Heroes Recognition ResNet34 notebook published on Kaggle. The author uses fastai's learn.lr_find() method to find the optimal learning rate. Plotting the loss function against the learning rate yields the following figure: It…
Sheldon
  • 4,084
  • 3
  • 20
  • 41
9
votes
1 answer

FastAi What does the slice(lr) do in fit_one_cycle()

In Lesson 3 - planet, I saw these 2 lines of code: lr = 0.01 learn.fit_one_cycle(5, slice(lr)) if the slice(min_lr, max_lr) then I understand the fit_one_cycle() will use the spread-out Learning Rates from slice(min_lr, max_lr). (Hopefully, my…
Franva
  • 6,565
  • 23
  • 79
  • 144
9
votes
2 answers

Fastai learner not loading

So I'm trying to load a model using: learn = create_cnn(data, models.resnet50, lin_ftrs=[2048], metrics=accuracy) learn.clip_grad(); learn.load(f'{name}-stage-2.1') But I get the following error RuntimeError: Error(s) in loading state_dict for…
M090009
  • 1,129
  • 11
  • 20
9
votes
2 answers

fastai learner requirements and batch prediction

I previously trained a resnet34 model using the fastai library, and have the weights.h5 file saved. With the latest version of fastai, do I still need to have non-empty train and valid folders in order to import my learner and predict on the test…
Austin
  • 6,921
  • 12
  • 73
  • 138
8
votes
1 answer

arm64 docker image for apple silicon M1 macbook air

While trying to run the docker image provided by fastai --> fastpages-jekyll I am running into several issues. This is a linux/amd64 image. I suspect that if there was a linux/arm64 image then it would run smoothly on my mackbook air M1 having apple…
pX0r
  • 1,472
  • 12
  • 14
8
votes
2 answers

Fast Ai: AttributeError: 'Learner' object has no attribute 'fine_tune'

Fast Ai uses a very unconventional style of from fastai import * etc. I for one do not like it so was painstakingly identifying each import in the chapter 2 of the fastai book but ran into the error AttributeError: 'Learner' object has no attribute…
Borun Chowdhury
  • 491
  • 2
  • 19
8
votes
4 answers

ModuleNotFoundError: No module named 'fastai.vision'

I am trying to use ImageDataBunch from fastai, and it worked fine, but recently when I ran my code, it showed this error ModuleNotFoundError: No module named 'fastai.vision' Then, I upgraded my fastai version pip install fastai --upgrade. This error…
i_am_lak
  • 116
  • 2
  • 7
8
votes
1 answer

Error while applying image augmentation transformations to data in FastAI

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…
1
2 3
28 29