UlysseCoteAllard / MyoArmbandDataset

GNU General Public License v3.0
84 stars 40 forks source link

难以理解的错误 #15

Open ryanloee opened 1 year ago

ryanloee commented 1 year ago

为什么我运行pytorch的CWT代码时候有很多错误也尝试按照我电脑的环境调整过但是在模型中的数据处理上出了许多错误,在没有理解具体模型的运行原理之下实在很难修改,好消息是在theano框架之下可以运行

类似这种 ..\MyoArmbandDataset-master\PyTorchImplementation\CWT\Wavelet_CNN_Target_Network.py:139: UserWarning: Implicit dimension choice for log_softmax has been deprecated. Change the call to include dim=X as an argument. return nn.functional.log_softmax(self._output(fc2_output)) Traceback (most recent call last): File "..\MyoArmbandDataset-master\PyTorchImplementation\CWT\evaluate_wavelet_target_network.py", line 474, in calculate_pre_training(examples_pre_training, labels_pre_training) File "..\MyoArmbandDataset-master\PyTorchImplementation\CWT\evaluate_wavelet_target_network.py", line 92, in calculate_pre_training precision=precision) File "..\MyoArmbandDataset-master\PyTorchImplementation\CWT\evaluate_wavelet_target_network.py", line 155, in pre_train_model loss = criterion(outputs, labels) File "E:\soft\anacondan\envs\sEMG\lib\site-packages\torch\nn\modules\module.py", line 1102, in _call_impl return forward_call(*input, **kwargs) File "E:\soft\anacondan\envs\sEMG\lib\site-packages\torch\nn\modules\loss.py", line 211, in forward return F.nll_loss(input, target, weight=self.weight, ignore_index=self.ignore_index, reduction=self.reduction) File "E:\soft\anacondan\envs\sEMG\lib\site-packages\torch\nn\functional.py", line 2532, in nll_loss return torch._C._nn.nll_loss_nd(input, target, weight, _Reduction.get_enum(reduction), ignore_index) RuntimeError: expected scalar type Long but found Int