Sir I am not getting how to find the shapes of output and y ?
I have tried this
`with torch.set_grad_enabled(phase == "train"):
                    output= model(X)
                    loss = criterion(output, y)
                    print(output.shape)
                    print(y.shape)

But its not working 
the input shape is (300,40,3).
When I tried this the model is working though
I =torch.randn(30,1,300,40,3)
model=Model3D(7)
O=model(I)

pleas guide