You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm getting this error when running !python train_pose2vid.py on colab:
Traceback (most recent call last):
File "train_pose2vid.py", line 127, in <module>
main()
File "train_pose2vid.py", line 43, in main
visualizer = Visualizer(opt)
File "/content/drive/My Drive/animation/EveryBodyDance/src/pix2pixHD/util/visualizer.py", line 26, in __init__
self.writer = tf.summary.FileWriter(self.log_dir)
AttributeError: module 'tensorboard.summary._tf.summary' has no attribute 'FileWriter'
When I changed the line 26 in visualizer.py (as said in this issue: #99), I'm getting this error instead:
Traceback (most recent call last):
File "train_pose2vid.py", line 127, in <module>
main()
File "train_pose2vid.py", line 43, in main
visualizer = Visualizer(opt)
File "/content/drive/My Drive/animation/EveryBodyDance/src/pix2pixHD/util/visualizer.py", line 26, in __init__
self.writer = tf.compat.v1.summary.FileWriter(self.log_dir)
File "/usr/local/lib/python3.7/dist-packages/tensorflow/python/summary/writer/writer.py", line 360, in __init__
"v1.summary.FileWriter is not compatible with eager execution. "
RuntimeError: v1.summary.FileWriter is not compatible with eager execution. Use `tf.summary.create_file_writer`,or a `with v1.Graph().as_default():` context
P.S. I changed it to tf.summary.create_file_writer, as said in the error message, and for now I'm not getting this error (it's currently executing this sell)
Traceback (most recent call last):
File "train_pose2vid.py", line 127, in <module>
main()
File "train_pose2vid.py", line 84, in main
errors = {k: v.data[0] if not isinstance(v, int) else v for k, v in loss_dict.items()}
File "train_pose2vid.py", line 84, in <dictcomp>
errors = {k: v.data[0] if not isinstance(v, int) else v for k, v in loss_dict.items()}
IndexError: invalid index of a 0-dim tensor. Use `tensor.item()` in Python or `tensor.item<T>()` in C++ to convert a 0-dim tensor to a number
The text was updated successfully, but these errors were encountered:
What version of tensorflow are you using? You can find this by printing the __version__ attribute print(tensorflow.__version__) for example.
If you are using GoogleColab, try: import tensorflow.compat.v1 as tf tf.disable_v2_behavior() %tensorflow_version 1.x
before running !python train_pose2vid.py
The IndexError message is related to:
errors = {k: v.data[0] if not isinstance(v, int) else v for k, v in loss_dict.items()}
See #100 : replace v.data[0] with v.data.item()
I'm getting this error when running
!python train_pose2vid.py
on colab:When I changed the line 26 in visualizer.py (as said in this issue: #99), I'm getting this error instead:
P.S. I changed it to
tf.summary.create_file_writer
, as said in the error message, and for now I'm not getting this error (it's currently executing this sell)Getting this error instead now (issue #48):
The text was updated successfully, but these errors were encountered: