srez – super-resolution

https://github.com/david-gpu/srez

python3 srez_main.py --run demo.

报错

Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/imageio/plugins/ffmpeg.py", line 82, in get_exe
    auto=False)
  File "/usr/local/lib/python3.5/dist-packages/imageio/core/fetching.py", line 102, in get_remote_file
    raise NeedDownloadError()
imageio.core.fetching.NeedDownloadError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "srez_main.py", line 1, in <module>
    import srez_demo
  File "/root/srez/srez_demo.py", line 1, in <module>
    import moviepy.editor as mpe
  File "/usr/local/lib/python3.5/dist-packages/moviepy/editor.py", line 22, in <module>
    from .video.io.VideoFileClip import VideoFileClip
  File "/usr/local/lib/python3.5/dist-packages/moviepy/video/io/VideoFileClip.py", line 3, in <module>
    from moviepy.video.VideoClip import VideoClip
  File "/usr/local/lib/python3.5/dist-packages/moviepy/video/VideoClip.py", line 21, in <module>
    from .io.ffmpeg_writer import ffmpeg_write_image, ffmpeg_write_video
  File "/usr/local/lib/python3.5/dist-packages/moviepy/video/io/ffmpeg_writer.py", line 11, in <module>
    from moviepy.config import get_setting
  File "/usr/local/lib/python3.5/dist-packages/moviepy/config.py", line 35, in <module>
    FFMPEG_BINARY = get_exe()
  File "/usr/local/lib/python3.5/dist-packages/imageio/plugins/ffmpeg.py", line 86, in get_exe
    raise NeedDownloadError('Need ffmpeg exe. '
imageio.core.fetching.NeedDownloadError: Need ffmpeg exe. You can download it by calling:
  imageio.plugins.ffmpeg.download()

修改

srez_demo.py

最上面加两行

import imageio
imageio.plugins.ffmpeg.download()

新建 checkpoint 文件夹,重新运行。

报错

Traceback (most recent call last):
 File "srez_main.py", line 190, in <module>
 tf.app.run()
 File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/platform/app.py", line 48, in run
 _sys.exit(main(_sys.argv[:1] + flags_passthrough))
 File "srez_main.py", line 185, in main
 _demo()
 File "srez_main.py", line 113, in _demo
 sess, summary_writer = setup_tensorflow()
 File "srez_main.py", line 103, in setup_tensorflow
 summary_writer = tf.train.SummaryWriter(FLAGS.train_dir, sess.graph)
AttributeError: module 'tensorflow.python.training.training' has no attribute 'SummaryWriter'

升级 tensorflow-gpu
/usr/bin/pip3 install –upgrade tensorflow-gpu

又报错

ImportError: libcudnn.so.6: cannot open shared object file: No such file or directory

参考 这篇文章

 

《srez – super-resolution》上有5条评论

  1. Traceback (most recent call last):
    File “srez_main.py”, line 190, in
    tf.app.run()
    File “/usr/local/lib/python3.6/site-packages/tensorflow/python/platform/app.py”, line 126, in run
    _sys.exit(main(argv))
    File “srez_main.py”, line 187, in main
    _train()
    File “srez_main.py”, line 168, in _train
    gene_loss = srez_model.create_generator_loss(disc_fake_output, gene_output, train_features)
    File “/media/amax/82293848-43b8-4cb6-91e1-e302a7ad7ea6/Bachelors/lishang/srez-master/srez_model.py”, line 452, in create_generator_loss
    cross_entropy = tf.nn.sigmoid_cross_entropy_with_logits(disc_output, tf.ones_like(disc_output))
    File “/usr/local/lib/python3.6/site-packages/tensorflow/python/ops/nn_impl.py”, line 156, in sigmoid_cross_entropy_with_logits
    labels, logits)
    File “/usr/local/lib/python3.6/site-packages/tensorflow/python/ops/nn_ops.py”, line 1775, in _ensure_xent_args
    “named arguments (labels=…, logits=…, …)” % name)
    ValueError: Only call `sigmoid_cross_entropy_with_logits` with named arguments (labels=…, logits=…, …)
    你好,请问这是什么情况?实在是搞不懂了。。。

  2. Traceback (most recent call last):
    File “srez_main.py”, line 190, in
    tf.app.run()
    File “/usr/local/lib/python3.6/site-packages/tensorflow/python/platform/app.py”, line 126, in run
    _sys.exit(main(argv))
    File “srez_main.py”, line 187, in main
    _train()
    File “srez_main.py”, line 168, in _train
    gene_loss = srez_model.create_generator_loss(disc_fake_output, gene_output, train_features)
    File “/media/amax/82293848-43b8-4cb6-91e1-e302a7ad7ea6/Bachelors/lishang/srez-master/srez_model.py”, line 452, in create_generator_loss
    cross_entropy = tf.nn.sigmoid_cross_entropy_with_logits(disc_output, tf.ones_like(disc_output))
    File “/usr/local/lib/python3.6/site-packages/tensorflow/python/ops/nn_impl.py”, line 156, in sigmoid_cross_entropy_with_logits
    labels, logits)
    File “/usr/local/lib/python3.6/site-packages/tensorflow/python/ops/nn_ops.py”, line 1775, in _ensure_xent_args
    “named arguments (labels=…, logits=…, …)” % name)
    ValueError: Only call `sigmoid_cross_entropy_with_logits` with named arguments (labels=…, logits=…, …)
    你好,请问这是什么情况?实在是搞不懂了。。。

发表评论

电子邮件地址不会被公开。

This site uses Akismet to reduce spam. Learn how your comment data is processed.