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

copy_task.py stopped with NotFoundError #13

Open
softgearko opened this issue Jan 19, 2018 · 3 comments
Open

copy_task.py stopped with NotFoundError #13

softgearko opened this issue Jan 19, 2018 · 3 comments

Comments

@softgearko
Copy link

When I run 'python3 copy_task.py', I got errors after batches 5000 as logs below.
Should I make ./save/copy_task/NTM directory?

batches 4900, loss 0.00113704
[[ 1. 1. 1. 1. 1. 1. 1. 0.]
[ 0. 0. 1. 1. 1. 0. 0. 0.]
[ 0. 1. 1. 0. 0. 1. 1. 0.]
[ 1. 0. 1. 1. 1. 0. 1. 1.]
[ 1. 0. 1. 0. 1. 0. 0. 0.]
[ 0. 1. 1. 0. 1. 0. 0. 1.]]
[[ 9.99992490e-01 9.99413490e-01 9.99982953e-01 9.99965310e-01
9.99992251e-01 9.97943461e-01 9.98543024e-01 1.08241523e-03]
[ 2.57530161e-07 2.93660793e-04 9.99461949e-01 9.99995112e-01
9.99989748e-01 1.24331400e-05 8.15727219e-07 3.13950721e-07]
[ 4.58355225e-06 9.99971747e-01 9.99837399e-01 4.42370627e-04
7.24922749e-04 9.99874592e-01 9.99990821e-01 8.03661169e-06]
[ 9.99992490e-01 3.12785669e-05 9.99974847e-01 9.99755561e-01
9.99990463e-01 2.00146256e-04 9.99897242e-01 9.99996305e-01]
[ 9.99901414e-01 1.38089956e-06 9.99881983e-01 2.78331245e-05
9.99562562e-01 2.01372593e-03 7.52124761e-05 1.45035756e-06]
[ 4.35841102e-05 9.99971151e-01 9.99959111e-01 2.36362739e-05
9.99997735e-01 2.10983402e-04 1.00746372e-04 9.99401808e-01]]
batches 5000, loss 0.00103774
2018-01-18 19:36:31.519871: W tensorflow/core/framework/op_kernel.cc:1192] Not found: ./save/copy_task/NTM; No such file or directory
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/client/session.py", line 1323, in _do_call
return fn(*args)
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/client/session.py", line 1302, in _run_fn
status, run_metadata)
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/framework/errors_impl.py", line 473, in exit
c_api.TF_GetCode(self.status.status))
tensorflow.python.framework.errors_impl.NotFoundError: ./save/copy_task/NTM; No such file or directory
[[Node: save/SaveV2 = SaveV2[dtypes=[DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT], _device="/job:localhost/replica:0/task:0/device:CPU:0"](_arg_save/Const_0_0, save/SaveV2/tensor_names, save/SaveV2/shape_and_slices, controller/basic_rnn_cell/bias/_7507, controller/basic_rnn_cell/kernel/_7509, init/init_M/_7511, init/init_r_0/_7513, init/init_state/_7515, o2o/o2o_b/_7517, o2o/o2o_w/_7519, o2p/o2p_b/_7521, o2p/o2p_w/_7523, optimizer/controller/basic_rnn_cell/bias/RMSProp/_7525, optimizer/controller/basic_rnn_cell/bias/RMSProp_1/_7527, optimizer/controller/basic_rnn_cell/kernel/RMSProp/_7529, optimizer/controller/basic_rnn_cell/kernel/RMSProp_1/_7531, optimizer/init/init_M/RMSProp/_7533, optimizer/init/init_M/RMSProp_1/_7535, optimizer/init/init_r_0/RMSProp/_7537, optimizer/init/init_r_0/RMSProp_1/_7539, optimizer/init/init_state/RMSProp/_7541, optimizer/init/init_state/RMSProp_1/_7543, optimizer/o2o/o2o_b/RMSProp/_7545, optimizer/o2o/o2o_b/RMSProp_1/_7547, optimizer/o2o/o2o_w/RMSProp/_7549, optimizer/o2o/o2o_w/RMSProp_1/_7551, optimizer/o2p/o2p_b/RMSProp/_7553, optimizer/o2p/o2p_b/RMSProp_1/_7555, optimizer/o2p/o2p_w/RMSProp/_7557, optimizer/o2p/o2p_w/RMSProp_1/_7559)]]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/training/saver.py", line 1573, in save
{self.saver_def.filename_tensor_name: checkpoint_file})
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/client/session.py", line 889, in run
run_metadata_ptr)
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/client/session.py", line 1120, in _run
feed_dict_tensor, options, run_metadata)
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/client/session.py", line 1317, in _do_run
options, run_metadata)
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/client/session.py", line 1336, in _do_call
raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.NotFoundError: ./save/copy_task/NTM; No such file or directory
[[Node: save/SaveV2 = SaveV2[dtypes=[DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT], _device="/job:localhost/replica:0/task:0/device:CPU:0"](_arg_save/Const_0_0, save/SaveV2/tensor_names, save/SaveV2/shape_and_slices, controller/basic_rnn_cell/bias/_7507, controller/basic_rnn_cell/kernel/_7509, init/init_M/_7511, init/init_r_0/_7513, init/init_state/_7515, o2o/o2o_b/_7517, o2o/o2o_w/_7519, o2p/o2p_b/_7521, o2p/o2p_w/_7523, optimizer/controller/basic_rnn_cell/bias/RMSProp/_7525, optimizer/controller/basic_rnn_cell/bias/RMSProp_1/_7527, optimizer/controller/basic_rnn_cell/kernel/RMSProp/_7529, optimizer/controller/basic_rnn_cell/kernel/RMSProp_1/_7531, optimizer/init/init_M/RMSProp/_7533, optimizer/init/init_M/RMSProp_1/_7535, optimizer/init/init_r_0/RMSProp/_7537, optimizer/init/init_r_0/RMSProp_1/_7539, optimizer/init/init_state/RMSProp/_7541, optimizer/init/init_state/RMSProp_1/_7543, optimizer/o2o/o2o_b/RMSProp/_7545, optimizer/o2o/o2o_b/RMSProp_1/_7547, optimizer/o2o/o2o_w/RMSProp/_7549, optimizer/o2o/o2o_w/RMSProp_1/_7551, optimizer/o2p/o2p_b/RMSProp/_7553, optimizer/o2p/o2p_b/RMSProp_1/_7555, optimizer/o2p/o2p_w/RMSProp/_7557, optimizer/o2p/o2p_w/RMSProp_1/_7559)]]

Caused by op 'save/SaveV2', defined at:
File "copy_task.py", line 101, in
main()
File "copy_task.py", line 29, in main
train(args)
File "copy_task.py", line 45, in train
saver = tf.train.Saver(tf.global_variables())
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/training/saver.py", line 1218, in init
self.build()
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/training/saver.py", line 1227, in build
self._build(self._filename, build_save=True, build_restore=True)
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/training/saver.py", line 1263, in _build
build_save=build_save, build_restore=build_restore)
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/training/saver.py", line 748, in _build_internal
save_tensor = self._AddSaveOps(filename_tensor, saveables)
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/training/saver.py", line 296, in _AddSaveOps
save = self.save_op(filename_tensor, saveables)
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/training/saver.py", line 239, in save_op
tensors)
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/ops/gen_io_ops.py", line 1163, in save_v2
shape_and_slices=shape_and_slices, tensors=tensors, name=name)
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/framework/op_def_library.py", line 787, in _apply_op_helper
op_def=op_def)
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/framework/ops.py", line 2956, in create_op
op_def=op_def)
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/framework/ops.py", line 1470, in init
self._traceback = self._graph._extract_stack() # pylint: disable=protected-access

NotFoundError (see above for traceback): ./save/copy_task/NTM; No such file or directory
[[Node: save/SaveV2 = SaveV2[dtypes=[DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT], _device="/job:localhost/replica:0/task:0/device:CPU:0"](_arg_save/Const_0_0, save/SaveV2/tensor_names, save/SaveV2/shape_and_slices, controller/basic_rnn_cell/bias/_7507, controller/basic_rnn_cell/kernel/_7509, init/init_M/_7511, init/init_r_0/_7513, init/init_state/_7515, o2o/o2o_b/_7517, o2o/o2o_w/_7519, o2p/o2p_b/_7521, o2p/o2p_w/_7523, optimizer/controller/basic_rnn_cell/bias/RMSProp/_7525, optimizer/controller/basic_rnn_cell/bias/RMSProp_1/_7527, optimizer/controller/basic_rnn_cell/kernel/RMSProp/_7529, optimizer/controller/basic_rnn_cell/kernel/RMSProp_1/_7531, optimizer/init/init_M/RMSProp/_7533, optimizer/init/init_M/RMSProp_1/_7535, optimizer/init/init_r_0/RMSProp/_7537, optimizer/init/init_r_0/RMSProp_1/_7539, optimizer/init/init_state/RMSProp/_7541, optimizer/init/init_state/RMSProp_1/_7543, optimizer/o2o/o2o_b/RMSProp/_7545, optimizer/o2o/o2o_b/RMSProp_1/_7547, optimizer/o2o/o2o_w/RMSProp/_7549, optimizer/o2o/o2o_w/RMSProp_1/_7551, optimizer/o2p/o2p_b/RMSProp/_7553, optimizer/o2p/o2p_b/RMSProp_1/_7555, optimizer/o2p/o2p_w/RMSProp/_7557, optimizer/o2p/o2p_w/RMSProp_1/_7559)]]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "copy_task.py", line 101, in
main()
File "copy_task.py", line 29, in main
train(args)
File "copy_task.py", line 77, in train
saver.save(sess, args.save_dir + '/' + args.model + '/model.tfmodel', global_step=b)
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/training/saver.py", line 1594, in save
raise exc
ValueError: Parent directory of ./save/copy_task/NTM/model.tfmodel doesn't exist, can't save.
softgear@lobe6:~/work/snowkylin_ntm_mann/ntm$

@snowkylin
Copy link
Owner

Please create directory ./save/copy_task/NTM so that checkpoint files have place to be saved. Sorry that I do not mention it in the readme file.

@softgearko
Copy link
Author

Yes. It works after I made that directory.
Thank you.

@azzedineA
Copy link

I have a question what is copy task ,I mean what Ntm try to learn in this task ?

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