RuntimeError: “LayerNormKernelImpl“ not implemented for ‘Long‘

Use the module downloaded from GitHUB for your own model. Be sure to pay attention to whether the data type (dtype) of the input data meets the requirements of the module.

Step 1: The data type is tensor: train_inputs=torch.tensor(train_inputs);

Step 2: Type of elements in the data: (according to your own needs: int, float16, float32)

train_inputs=torch.tensor(train_inputs,dtype=torch.float32)

おすすめ

転載: blog.csdn.net/weiyuangong/article/details/125065753