No attribute data means, its expecting an autograd.Variable, and youre feeding it a torch.Tensor, so just wrap your torch.Tensor in an autograd.Variable, and should work ok.
(thinkgin about this, it seems like the modules themselves could handle this conversion themsevles. but, for now, they dont…)