Using FastAI ConvLayer

Okay so this is a noob question and I’m sorry if its posted in the wrong place, but I have no where else to turn.

Question:
What needs to be imported to use ConvLayer?

Context:
Basicly, I’m implementing a 3D conv net for MRI image processing. I’m trying to wrap my head around how FastAI conv layers are implemented. The following documentation is being followed : http://dev.fast.ai/layers.html.

However, when I’m trying to use the ConvLayer class it says its undefined. Again,t he question: what do I need to import?

Steps tried:
I’ve imported the following modules:
import fastai.vision
import fastai.layers
from fastai import layers

You’re looking at the fastai2 convlayer, not fastaiv1 which is conv_layer. For documentation you should also use docs.fast.ai as dev.fast.ai is for the fastai2 documentation

2 Likes

So there are two FastAI versions. Guessing the second one is still in development hence dev.fast.ai.

Thanks for clearing that up for me.

Okay, So im trying to use conv_layer but it still says its undefined. What module in particular needs to be imported.

I’ve imported the following modules:
import fastai.vision as faiv
import fastai.layers
from fastai import layers

import torch
from torch import nn
import torchvision

to no avail…

You should do from fastai.layers import *

1 Like