foryichuanqi / RESS-Paper-2022.09-Remaining-useful-life-prediction-by-TaFCN

The source code of paper: Trend attention fully convolutional network for remaining useful life estimation in the turbofan engine PHM of CMAPSS dataset. Signal selection, Attention mechanism, and Interpretability of deep learning are explored.
44 stars 1 forks source link

interpretability #5

Open leijdjcn opened 1 month ago

leijdjcn commented 1 month ago

Traceback (most recent call last): File "D:/Download files/wenxiandaima/FCN/code/figure/interpretability_TaNet_analysis.py", line 207, in model=keras.models.load_model(r"....\model\interpretability_TaNet{}.h5".format(model_name),custom_objects={'root_mean_squared_error': root_mean_squared_error}) File "C:\Users\Liyanhui.conda\envs\tensor\lib\site-packages\keras\engine\saving.py", line 419, in load_model model = _deserialize_model(f, custom_objects, compile) File "C:\Users\Liyanhui.conda\envs\tensor\lib\site-packages\keras\engine\saving.py", line 224, in _deserialize_model model_config = json.loads(model_config.decode('utf-8')) AttributeError: 'str' object has no attribute 'decode' The configured environment is the same as the environment configured by your open source code, starting with the dataset you provide. If you want to run the dataset you provide, will the results be the same as the paper? How to solve the above problems when executing the module interpretability_TaNet_analysis?(所配的环境都是按你的开源代码所配置的一模一样的环境,按你提供的数据集来开始的,想运行下你提供的数据集得出的结果是否跟论文一样,在执行interpretability_TaNet_analysis这一模块时,出现上述问题怎么解决?)

Using TensorFlow backend. 2024-05-08 16:46:28.560115: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudart64_100.dll Traceback (most recent call last): File "D:/Download files/wenxiandaima/FCN/code/figure/prediction_error.py", line 33, in from tfdeterminism import patch ModuleNotFoundError: No module named 'tfdeterminism' How to solve the above problem when running the interpretability analysis module?(在运行interpretability_analysis这一模块时,出现上述问题如何解决) 

foryichuanqi commented 1 month ago

First of all, you need to understand that the environment I show is only part of the environment. Your environment, computer configuration, and all software versions cannot be exactly the same as mine. This is a compatibility issue caused by software or hardware. You should change the code according to the problem. Don't be obsessed with an environment that matches me exactly. Question 1: AttributeError: 'str' object has no attribute 'decode'. Obviously, this requires you to search for what is wrong with the code and change it. Question 2: ModuleNotFoundError: No module named 'tfdeterminism'. Apparently this is because you didn't install 'tfdeterminism'. You can choose to delete its related code, or install it. (This is not necessary and can be deleted)首先你要明白 我显示的环境只是部分环境。你的环境电脑配置,所有软件的版本不可能都和我完全一致。这就是软件或硬件造成的兼容性问题。你应该去根据问题去改变一下代码。不要执着于跟我匹配完全一致的环境。问题一:AttributeError: 'str' object has no attribute 'decode'。很明显,这是需要你去搜索一下代码哪里出了问题,去更改一下。问题二:ModuleNotFoundError: No module named 'tfdeterminism'。很明显这是你没有安装'tfdeterminism'。你可以选择删除它相关的代码,或者安装。(这个东西不是必要的,可以删除)