Hi, everyone. When I ran flownet, got this error, can anyone help me?
This is the place where the error was started, from ‘‘flow_pyramid_pred = [torch.nn.functional.interpolate(model(img_pyramid[-1]), size=(256, 256))]’’
And the torch.size of my dataset is [100,1,512,512]
And this is the code of flownet-S
It seems the default
in_channels value is set to 2, while your input data has only a single channel.
in_channels=1 in your model initialization and run the code again.
PS: It’s always better to post directly by wrapping it in three backticks ```
Thanks for your reply!!
but actually i want to input 2 images into flownet, so the in_channel is 2, i really don’t know how could I do it in my code(from [100,1,512,512] to [50,2,512,512]).
If you would like to input two image, would you like to concatenate them in the channel dimension or handle them separately, e.g. by calling the forward method on both images separately?