i use this CNN architecture to classify images (input : 224,224) , (output: 2 )
class ConvNet(nn.Module):
    def init(self, num_classes=2):
        super(ConvNet, self).init()
        self.layer1 = nn.Sequential(
            nn.Conv2d(1, 16, kernel_size=5, stride=1, padding=2),
            nn.ReLU(),
            nn.MaxPool2d(kernel_size=2, stride=2))
        self.layer2 = nn.Sequential(
            nn.Conv2d(16, 32, kernel_size=5, stride=1, padding=2),
            #nn.BatchNorm2d(64),
            nn.ReLU(),
            nn.MaxPool2d(kernel_size=5, stride=0))

        self.drop_out = nn.Dropout()

        self.fc1 = nn.Linear(15488, 1000)
        self.fc2 = nn.Linear(1000 ,2)

    def forward(self, x):
        x.float()
        #x = x.permute(0,3,1,2)
        out = self.layer1(x)
        out = self.layer2(out)
        out = out.reshape(out.size(0), -1)
        out = self.drop_out(out)
        out = self.fc1(out)
        out = self.fc2(out)

        return out

and it gives me :
RuntimeError: [enforce fail at ..\c10\core\CPUAllocator.cpp:72] data. DefaultCPUAllocator: not enough memory: you tried to allocate 38816153600 bytes. Buy new RAM!

cpu : intel xeon® e5-2696 v3 , 2.30ghz
ram : 110gb