500字范文,内容丰富有趣,生活中的好帮手!
500字范文 > 论文代码复现环境配置

论文代码复现环境配置

时间:2023-06-03 12:45:38

相关推荐

论文代码复现环境配置

论文代码复现环境配置

报错1:python导入tensorflow出现_np_qint8 = np.dtype([(“qint8”, np.int8, 1)])报错2:ValueError: Parent directory of D:\Python_Project\MDL-RS/save_CNN_Middle/model.ckpt doesn't exist, can't save.报错3:tensorflow.python.framework.errors_impl.InternalError: Blas SGEMM launch failed结果:论文代码放到GPU上跑MDL-RS_CNNs:MDL-RS_FC-Nets:

报错1:python导入tensorflow出现_np_qint8 = np.dtype([(“qint8”, np.int8, 1)])

pip uninstall numpypip 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 osos.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)

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。