论文代码复现环境配置
报错1:python导入tensorflow出现_np_qint8 = np.dtype([(“qint8”, np.int8, 1)])
pip uninstall numpy
pip install numpy==1.16
报错2:ValueError: Parent directory of D:\Python_Project\MDL-RS/save_CNN_Middle/model.ckpt doesn’t exist, can’t save.
不能保存,因为路径不存在,修改一下278行的路径:
save_path = saver.save(sess,“D:/毕设相关/IEEE_TGRS_MDL-RS-master/IEEE_TGRS_MDL-RS-master/MDL-RS_CNNs/save_CNN_Middle/model.ckpt”)
参考
报错3:tensorflow.python.framework.errors_impl.InternalError: Blas SGEMM launch failed
解决方案:
点击跳转
结果:
tensorflow使用的是gpu
论文代码放到GPU上跑
import os
os.environ['CUDA_VISIBLE_DEVICES'] = '/gpu:0'
ps:fc 文件里不需要
from tfdeterminism import patch
patch()
因为源代码里面没有
MDL-RS_CNNs:
(1)Middle_fusion_cnns
(2)Lidar_cnns
(3)late_fusion_cnns
(4)HSI_cnns
(5)en_de_fusion_cnns
(6)early_fusion_cnns
(7)cross_fusion_cnns
MDL-RS_FC-Nets:
(1)
(2)
(3)
(4)
(5)
(6)
(7)
(8)