运行因子分解机fm的examples报embedding中第一个参数的Int型和Long型错误
报错:Expected tensor for argument #1 ‘indices’ to have scalar type Long; but got torch.IntTensor instead (while checking arguments for embedding)
办法
embedding中的第一个参数应为Long,而调用时赋了Int值。找到前面调用embedding的函数,在输入的第一个参数后加.long()。有时需要这样修改Torch内部的库函数,不要因为是库函数而不敢修改。