You could use the functional API via:
import torch.nn.functional as F

data = ... # input data
weight = ... # conv filters
bias = ... # conv bias
out = F.conv2d(data, weight, bias, padding=...)




 drogor:

Also this seemes to mess up the backpropagation (must likely a bug in my code).


I would guess it’s not a bug in your code but a known limitation, as using numpy operations will break the computation graph since Autograd is not aware of these ops and cannot track them.