微智科技网
您的当前位置:首页tensorflow_core._api.v2.io.gfile has no attribute get_filesystem 问题

tensorflow_core._api.v2.io.gfile has no attribute get_filesystem 问题

来源:微智科技网

‘tensorflow_core._api.v2.io.gfile’ has no attribute ‘get_filesystem’

链接:
博主在学习PyTorch官网Tensorboard的tutorial时,运行这段代码

writer.add_embedding(features,metadata=class_labels,\
label_img=images.unsqueeze(1))writer.close()

时会出现如上问题
尝试卸载tensorflow,创建新环境(只包含pytorch),但还会出现
所以我直接在tensorboard.writer.py文件中加入

import tensorboard as tb
tf.io.gfile = tb.compat.tensorflow_stub.io.gfile

成功解决

因篇幅问题不能全部显示,请点此查看更多更全内容