HinokiBAI / NASA_Li-ion_Battery_SOH_Prediction_with_MVIP-Trans

This research provides a prognostic framework for off-line SOH estimation of Li-ion battery. With a CNN-Transformer architecture, this program is capable of modeling the temporal correlations of battery signals from both local and global views. In this way, the learning ability of both local features and long period contexts will be enhanced.
64 stars 9 forks source link

有些问题想i请教,维度不一样只能把float64改成float32才能运行,对最后结果有影响吗 #2

Open ljj897 opened 1 month ago

ljj897 commented 1 month ago

File "d:\learn\NASA_Li-ion_Battery_SOH_Prediction_with_MVIP-Trans\soh_train.py", line 497, in experiment ypred, , _ = model(inputs) File "D:\anaconda3\envs\pytorch\lib\site-packages\torch\nn\modules\module.py", line 1532, in _wrapped_call_impl return self._call_impl(*args, kwargs) File "D:\anaconda3\envs\pytorch\lib\site-packages\torch\nn\modules\module.py", line 1541, in _call_impl return forward_call(*args, *kwargs) File "d:\learn\NASA_Li-ion_Battery_SOH_Prediction_with_MVIP-Trans\soh_train.py", line 301, in forward x = self.to_patch_embedding(img) File "D:\anaconda3\envs\pytorch\lib\site-packages\torch\nn\modules\module.py", line 1532, in _wrapped_call_impl return self._call_impl(args, kwargs) File "D:\anaconda3\envs\pytorch\lib\site-packages\torch\nn\modules\module.py", line 1541, in _call_impl return forward_call(*args, kwargs) File "D:\anaconda3\envs\pytorch\lib\site-packages\torch\nn\modules\container.py", line 217, in forward input = module(input) File "D:\anaconda3\envs\pytorch\lib\site-packages\torch\nn\modules\module.py", line 1532, in _wrapped_call_impl return self._call_impl(*args, *kwargs) File "D:\anaconda3\envs\pytorch\lib\site-packages\torch\nn\modules\module.py", line 1541, in _call_impl return forward_call(args, kwargs) File "D:\anaconda3\envs\pytorch\lib\site-packages\torch\nn\modules\conv.py", line 460, in forward return self._conv_forward(input, self.weight, self.bias) File "D:\anaconda3\envs\pytorch\lib\site-packages\torch\nn\modules\conv.py", line 456, in _conv_forward return F.conv2d(input, weight, bias, self.stride, RuntimeError: Input type (double) and bias type (float) should be the same

HinokiBAI commented 1 month ago

没有

ljj897 @.***> 于2024年7月29日周一 21:02写道:

File "d:\learn\NASA_Li-ion_Battery_SOH_Prediction_with_MVIP-Trans\soh_train.py", line 497, in experiment ypred, , _ = model(inputs) File "D:\anaconda3\envs\pytorch\lib\site-packages\torch\nn\modules\module.py", line 1532, in _wrapped_call_impl return self._call_impl(*args, kwargs) File "D:\anaconda3\envs\pytorch\lib\site-packages\torch\nn\modules\module.py", line 1541, in _call_impl return forward_call(*args, *kwargs) File "d:\learn\NASA_Li-ion_Battery_SOH_Prediction_with_MVIP-Trans\soh_train.py", line 301, in forward x = self.to_patch_embedding(img) File "D:\anaconda3\envs\pytorch\lib\site-packages\torch\nn\modules\module.py", line 1532, in _wrapped_call_impl return self._call_impl(args, kwargs) File "D:\anaconda3\envs\pytorch\lib\site-packages\torch\nn\modules\module.py", line 1541, in _call_impl return forward_call(*args, kwargs) File "D:\anaconda3\envs\pytorch\lib\site-packages\torch\nn\modules\container.py", line 217, in forward input = module(input) File "D:\anaconda3\envs\pytorch\lib\site-packages\torch\nn\modules\module.py", line 1532, in _wrapped_call_impl return self._call_impl(*args, *kwargs) File "D:\anaconda3\envs\pytorch\lib\site-packages\torch\nn\modules\module.py", line 1541, in _call_impl return forward_call(args, kwargs) File "D:\anaconda3\envs\pytorch\lib\site-packages\torch\nn\modules\conv.py", line 460, in forward return self._conv_forward(input, self.weight, self.bias) File "D:\anaconda3\envs\pytorch\lib\site-packages\torch\nn\modules\conv.py", line 456, in _conv_forward return F.conv2d(input, weight, bias, self.stride, RuntimeError: Input type (double) and bias type (float) should be the same

— Reply to this email directly, view it on GitHub https://github.com/HinokiBAI/NASA_Li-ion_Battery_SOH_Prediction_with_MVIP-Trans/issues/2, or unsubscribe https://github.com/notifications/unsubscribe-auth/AVUUNBXLZPUGWAE2JXNKLHDZOY4MVAVCNFSM6AAAAABLUHTF26VHI2DSMVQWIX3LMV43ASLTON2WKOZSGQZTKMZWGI4TINA . You are receiving this because you are subscribed to this thread.Message ID: <HinokiBAI/NASA_Li-ion_Battery_SOH_Prediction_with_MVIP-Trans/issues/2 @github.com>