Closed dungxibo123 closed 2 years ago
I'm afraid that's far too large an example for us to help you debug. Moreover it's not clear that this is actually an issue to do with torchsde at all (indeed you mention that using linear layers seems to work correctly).
Your basic approach of reshaping from (batch, channels * height * width)
to (batch, channels, height, width)
, and back again, sounds essentially correct, however.
Thanks Ms @patrick-kidger, whenever I raise a issue and got your answers, I find out what happen in my work.
I have done more Experiments, and the issue cause by the Adaptive Average Pooling, I dont really know why.
Hi,
I am re-implementing Neural SDE paper.
When I tried using Neural SDE with bunch of linear layers, every thing seem to be good, the train accuracy about 0.92 on valid set.
After that, I tried with convolution layers. First of all, I realize that
f
andg
take(B,N)
shape of input. So in theforward
step of my network, I usedtorch.view
method as a way to reshape flattened input into the square image. And continue feed the data through bunch of Convolution layer, and as final step, one more time, I use thetorch.view
method to reshape in to(B,N)
shape. (Take a look below).The code run with no any mistake. But there is a thing that the results is not so good. It usually converges at second / thrid epoch. And accuracy with convolution layers is not good at all. So my question here is: "Will the convolution layer is available in torchsde by someway or the
loss.backward()
does not updateConcatConv2d
s' parameters?"