ConvTranspose1d produces a different result on MPS than on the CPU. Example follows.
import torch
from torch import nn
y = torch.ones(1, 1, 2)
deconv = nn.ConvTranspose1d(in_channels=1, out_channels=1, kernel_size=1, stride=2, bias=False)
deconv.weight.data = torch.ones(1,1,2)
gpudeconv = copy.deepcopy(deconv).to(device=‘mps’)
x = deconv(y)
print (x)
ygpu = y.to(device=‘mps’)
xgpu = gpudeconv(ygpu)
print(xgpu)
Result:
tensor([[[1., 1., 1., 1.]]], grad_fn=)
tensor([[[1., 2., 1., 0.]]], device=‘mps:0’, grad_fn=)