Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I can't be able to restore the saved net #6

Open
openviso opened this issue Feb 14, 2017 · 3 comments
Open

I can't be able to restore the saved net #6

openviso opened this issue Feb 14, 2017 · 3 comments

Comments

@openviso
Copy link

runfile('D:/SRGAN-master/generate.py', wdir='D:/SRGAN-master')
Extracting ./asset/data/mnist\train-images-idx3-ubyte.gz
Extracting ./asset/data/mnist\train-labels-idx1-ubyte.gz
Extracting ./asset/data/mnist\t10k-images-idx3-ubyte.gz
Extracting ./asset/data/mnist\t10k-labels-idx1-ubyte.gz
Traceback (most recent call last):

File "", line 1, in
runfile('D:/SRGAN-master/generate.py', wdir='D:/SRGAN-master')

File "C:\Anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 866, in runfile
execfile(filename, namespace)

File "C:\Anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 102, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)

File "D:/SRGAN-master/generate.py", line 60, in
saver.restore(sess, tf.train.latest_checkpoint('asset/train/ckpt'))

File "C:\Anaconda3\lib\site-packages\tensorflow\python\training\saver.py", line 1388, in restore
{self.saver_def.filename_tensor_name: save_path})

File "C:\Anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 766, in run
run_metadata_ptr)

File "C:\Anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 964, in _run
feed_dict_string, options, run_metadata)

File "C:\Anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 1014, in _do_run
target_list, options, run_metadata)

File "C:\Anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 1021, in _do_call
return fn(*args)

File "C:\Anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 1003, in _run_fn
status, run_metadata)

SystemError: returned a result with an error set

@xolott
Copy link

xolott commented Jul 27, 2017

I have the same problem.


TypeError: expected bytes, NoneType found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "generate.py", line 60, in <module>
    saver.restore(sess, tf.train.latest_checkpoint('asset/train/ckpt'))
  File "/media/Documents/Symmetrik/PythonEnviroments/tesnorflow1.0Python3.5/lib/python3.5/site-packages/tensorflow/python/training/saver.py", line 1428, in restore
    {self.saver_def.filename_tensor_name: save_path})
  File "/media/Documents/Symmetrik/PythonEnviroments/tesnorflow1.0Python3.5/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 767, in run
    run_metadata_ptr)
  File "/media/Documents/Symmetrik/PythonEnviroments/tesnorflow1.0Python3.5/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 965, in _run
    feed_dict_string, options, run_metadata)
  File "/media/Documents/Symmetrik/PythonEnviroments/tesnorflow1.0Python3.5/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1015, in _do_run
    target_list, options, run_metadata)
  File "/media/Documents/Symmetrik/PythonEnviroments/tesnorflow1.0Python3.5/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1022, in _do_call
    return fn(*args)
  File "/media/Documents/Symmetrik/PythonEnviroments/tesnorflow1.0Python3.5/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1004, in _run_fn
    status, run_metadata)
SystemError: <built-in function TF_Run> returned a result with an error set

@xolott
Copy link

xolott commented Jul 27, 2017

The problem was on
saver.restore(sess, tf.train.latest_checkpoint('asset/train/ckpt'))

The subdirectory ckpt doesn't exists. So, leaving that line with:
saver.restore(sess, tf.train.latest_checkpoint('asset/train/'))

works!

@kevinjoseph1995
Copy link

Thank you so much for this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants