Buy new ram error

Hello everyone,

I’m trying to build YOLO on pytorch, both for Academic reasons(I’m rather new to deep learning) and because I’m trying to use it to control a robot. However when I run the following line to create a new layer

Self.conv10 = nn.Conv3d(9,4,1024)

Which is one of the layers detailed in the paper, I receive an error telling me that I allocated 114gb of ram and that ends with Buy New Ram! If you need to know my computer specs, I have a SurfacePro with 16gb ram, and I8, and a NVIDIA 1069

Hi Ferruolo,
The conv3d parameters are input channels, output channels and kernel size in that order. Please ensure this is consistent with your code.
As you have given kernel size as 1024, the resulting weight tensor is of the size 9 x 4x 1024 x 1024 x 1024. That is a highly unusual kernel size in current literature.

I pulled that diagram from the Yolo paper. As far as I am aware, the notation of the kernels is INxOUTxKERNEL_SIZE. However, I am self taught, so that may be where I am wrong. What would I want to use for the 3x3x1024_kernel layer then?

@Ferruolo - You should be using conv2d here instead of conv3d.
For 3x3x1024, it means that you have 1024 kernel filters of 3x3 size each. So your out_channels here is 1024, kernel_size is 3x3 and in_channels is the number of channels from the previous layer.

1 Like

Thanks a lot for your help @Gullal and @Mazhar_Shaikh.

@Ferruolo - Pytorch Docs are very detailed and easy to follow, and there are plenty of tutorials on github. You can follow them to learn more.

1 Like

I think every time someone opens PyTorch forum, at first should be redirected to this phrase.

1 Like