所有人。我被困在了火把里用拉力板。要点是add_embedding方法使错误如下所示:
Traceback (most recent call last):
File "test2.py", line 126, in <module>
writer.add_embedding(features, metadata=class_labels, label_img = images.unsqueeze(1))
File "/home/dgjung/anaconda3/envs/pytorch/lib/python3.8/site-packages/torch/utils/tensorboard/writer.py", line 798, in add_embedding
fs = tf.io.gfile.get_filesystem(save_path)
AttributeError: module 'tensorflow._api.v2.io.gfile' has no attribute 'get_filesystem'我的代码是pytorch教程。
# log embeddings
features = images.view(-1, 28 * 28)
writer.add_embedding(features,
metadata=class_labels,
label_img=images.unsqueeze(1))我的环境是:
求你救救我!
发布于 2021-05-03 19:02:22
这是一个讨厌的小虫子,有人需要修补。有个关于它的话题,这里
我可以通过添加以下内容来修复它:
import tensorboard as tb
tf.io.gfile = tb.compat.tensorflow_stub.io.gfile将/utils/tensorboard/Writer.py仅在第798行上方
glhf
https://stackoverflow.com/questions/66490589
复制相似问题