May I change it like this? But I will get this error, how can I modify it?
微信图片_20200302161240955×138 8 KB

params for source dataset
src_dataset = scipy.io.loadmat('E:\\ADDA\\pytorch-adda-master-lab\\datasets\\lab\\maria\\mat\\test_target_domain_maria.mat')
testdata = src_dataset['testdata'] # use the key for data here
testlabel = src_dataset['testlabel'] # use the key for target here

testdata = torch.from_numpy(testdata).float()
testlabel = torch.from_numpy(testlabel).long() # change type to your use case

dataset = TensorDataset(testdata, testlabel)

src_encoder_restore = os.path.join(model_root, src_dataset + "-source-encoder-final.pt")
src_classifier_restore = os.path.join(model_root, src_dataset + "-source-classifier-final.pt")
src_model_trained = True```