张力板:Pytorch教程:模块';tensorflow.u api.v2.io.gfile';没有属性';获取文件系统&x27;
我在运行关于Pytorch和带嵌入的TensorBoard的教程时遇到问题 我有这个信息张力板:Pytorch教程:模块';tensorflow.u api.v2.io.gfile';没有属性';获取文件系统&x27;,pytorch,google-colaboratory,tensorboard,Pytorch,Google Colaboratory,Tensorboard,我在运行关于Pytorch和带嵌入的TensorBoard的教程时遇到问题 我有这个信息 AttributeError Traceback (most recent call last) <ipython-input-10-e0404d94b4cd> in <module>() 22 writer.add_embedding(features, 23 meta
AttributeError Traceback (most recent call last)
<ipython-input-10-e0404d94b4cd> in <module>()
22 writer.add_embedding(features,
23 metadata=class_labels,
---> 24 label_img=images.unsqueeze(1))
25 writer.close()
/usr/local/lib/python3.6/dist-packages/torch/utils/tensorboard/writer.py in add_embedding(self, mat, metadata, label_img, global_step, tag, metadata_header)
779 save_path = os.path.join(self._get_file_writer().get_logdir(), subdir)
780
--> 781 fs = tf.io.gfile.get_filesystem(save_path)
782 if fs.exists(save_path):
783 if fs.isdir(save_path):
AttributeError回溯(最近一次调用)
在()
22.添加_嵌入(功能,
23元数据=类标签,
--->24 label_img=图像。取消查询(1))
25.关闭
/添加嵌入中的usr/local/lib/python3.6/dist-packages/torch/utils/tensorboard/writer.py(self、mat、元数据、标签img、全局步骤、标记、元数据头)
779 save_path=os.path.join(self.\u get_file\u writer().get_logdir(),subdir)
780
-->781 fs=tf.io.gfile.get\u文件系统(保存路径)
782如果fs.存在(保存路径):
783如果fs.isdir(保存路径):
我可以想象投影仪,试试这个
将tensorflow导入为tf
将张力板作为tb导入
tf.io.gfile=tb.compat.tensorflow\u stub.io.gfile