File "D:\python_project\multidim_conv-master\multidim_conv-master\train.py", line 404, in <module>
train_wind_nl(folder+data, epochs=150, input_timesteps=6, prediction_timestep=t, dev=dev, earlystopping=20)
File "D:\python_project\multidim_conv-master\multidim_conv-master\train.py", line 307, in train_wind_nl
summary(model, (7, input_timesteps, 6), device="cpu")
File "C:\Users\xinyi\.conda\envs\pytorch\lib\site-packages\torchsummary\torchsummary.py", line 72, in summary
model(*x)
File "C:\Users\xinyi\.conda\envs\pytorch\lib\site-packages\torch\nn\modules\module.py", line 1518, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "C:\Users\xinyi\.conda\envs\pytorch\lib\site-packages\torch\nn\modules\module.py", line 1527, in _call_impl
return forward_call(*args, **kwargs)
File "D:\python_project\multidim_conv-master\multidim_conv-master\models\wind_models.py", line 93, in forward
x = F.relu(self.conv1(x))
File "C:\Users\xinyi\.conda\envs\pytorch\lib\site-packages\torch\nn\modules\module.py", line 1518, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "C:\Users\xinyi\.conda\envs\pytorch\lib\site-packages\torch\nn\modules\module.py", line 1568, in _call_impl
result = forward_call(*args, **kwargs)
File "D:\python_project\multidim_conv-master\multidim_conv-master\models\attention_augmented_conv.py", line 52, in forward
flat_q, flat_k, flat_v, q, k, v = self.compute_flat_qkv(x, self.dk, self.dv, self.Nh)
File "D:\python_project\multidim_conv-master\multidim_conv-master\models\attention_augmented_conv.py", line 79, in compute_flat_qkv
q *= dkh ** -0.5
RuntimeError: Output 0 of ReshapeAliasBackward0 is a view and is being modified inplace. This view is the output of a function that returns multiple views. Such functions do not allow the output views to be modified inplace. You should replace the inplace operation by an out-of-place one.
Hello author, I created a new virtual environment in Anaconda and installed the latest version of PyTorch. However, when running the code, it stops and throws an error around 30%. The error code is shown above. I searched on Google and made some improvements to the line of code q *= dkh ** -0.5
. Now it doesn't stop at 30% anymore, but it starts from 0 again. I spent a long time trying to figure it out but couldn't. I hope to get your answer on what I should do to run your code.