nn.Linear only takes FloatTensors

Re: my other post, which can be found here - RuntimeError: Expected object of type torch.LongTensor but found type torch.FloatTensor f or argument #2 'mat2'

I traced the issue into the nn.functional module, and it seems like the error is thrown because the weights variable in the layer class is a FloatTensor.

Idk if this is the right place to post this, but it appears to me that the devs could include in the docs somewhere that this is a requirement of the layer, and/or make this more clear by catching the error before something more general and less helpful is made to propogate up from some low level component?

Hi, can you update your other post with your findings, it’ll help others in the future.