How about…
Replacing .data.cpu().numpy().reshape((-1,3,64)) with  .view(-1, 3, 64) which has the advantage of leaving everything on the gpu.
Then
modulationData = x[:,384:448]
fresult = torch.ones((modulationData.size(0), 3, 1024)).view(-1, 3072))
return fresult

But unless I am much mistaken, your decoder (and this refactoring) returns a Variable that contains only 1s.