Open 2018302345 opened 2 years ago
Traceback (most recent call last): File "ancient_chinese_train_test.py", line 546, in training_mask(model=model, epoch=40, train=train_loader, valid=valid_loader, quote_tensor=qudings, device=device) File "ancient_chinese_train_test.py", line 490, in training_mask labels = labels.to(device, dtype=torch.long) AttributeError: 'tuple' object has no attribute 'to'
training mask里面的labels是直接返回的quote,没有经过编码。
代码有些问题,已经修改好了,请再运行一下
Traceback (most recent call last): File "ancient_chinese_train_test.py", line 546, in
training_mask(model=model, epoch=40, train=train_loader, valid=valid_loader, quote_tensor=qudings, device=device)
File "ancient_chinese_train_test.py", line 490, in training_mask
labels = labels.to(device, dtype=torch.long)
AttributeError: 'tuple' object has no attribute 'to'
training mask里面的labels是直接返回的quote,没有经过编码。