我需要创建一个函数来更新元组列表中的元组。元组包含事务,这些事务的特征是ammount、day和type。我做了这个函数,它应该用一个新的元组完全替换一个元组,但是当我尝试打印更新后的元组列表时,我得到了错误:
TypeError: tuple indices must be integers or slices
在运行train()函数时,我一直得到TypeError: tuple indices must be integers or slices, not tuple。我使用的是torch version 1.6.0和CUDA 10.1以及最新版本的torch-scatter、torch-sparse、torch-cluster、torch-spline-conv和torch-geometric下面是详细的错误:
谢谢你的帮助。