Closed mrka124 closed 6 years ago
I don't know what "pytorch not support tensor with different size." means. Did you mean that you want to input multiple size images at the same time? If so, you should calculate the gradient for each image separately then backward together. You should further read how mini-batch gradient descent is implemented on pytorch.
Traceback (most recent call last):
File "main.py", line 54, in
Hi, I have used your SPP layer implement but I found that pytorch not support tensor with different size. So if I want to forward image to the net, I need to to set batch_size=1 like this:
dataLoader = DataLoader(dataSet, batch_size=1, shuffle=True)
So the training speed is really slow, because we backprop for each image. Do you have any idea for this?Many thanks