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
cc:184 Key generator/g_d1_bn/beta not found in checkpoint #64
Comments
Hey guy I have some update for this issues Really have't the key g_d1_bn/beta the same as past I and still try to solve this problem |
|
Hi, have you found any way to solve it? If you have any solution, please reply. I really need to get it work. |
maybe you will encounter others problems: problem: because Unet's embedding number ,size aren't match. you should ensure that the parameter of infer.py embedding_num and embedding_dim same with train.py problem: because two document image_size are different should make sure that the tarin.py and infer.py are same or you can see the original message someone answer me before
|
when I run pcgreat/zi2zi
do the instruction
have the error
I am not sure that i am get the train model in my Issues problem #59
I suppose that I am success get the model in the correct model_dir
but have the error info that
cc:184 Key generator/g_d1_bn/beta not found in checkpoint
How should I fixed this problem ?
the following text is my input instruction and the terminal log
Infer
PYTHONPATH=. python infer.py --model_dir=experiments/checkpoint/experiment_0
--batch_size=32
--source_obj=experiments/data/val.obj
--embedding_ids=0
--save_dir=save_dir/
(py36) sjshyu@sjshyu-titan:~/Desktop/360315$ sh test.sh
2019-03-29 14:10:03.478788: I tensorflow/core/platform/cpu_feature_guard.cc:140] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX AVX2 FMA
2019-03-29 14:10:03.660390: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1356] Found device 0 with properties:
name: GeForce GTX TITAN X major: 5 minor: 2 memoryClockRate(GHz): 1.076
pciBusID: 0000:02:00.0
totalMemory: 11.92GiB freeMemory: 11.17GiB
2019-03-29 14:10:03.792179: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1356] Found device 1 with properties:
name: GeForce GTX TITAN X major: 5 minor: 2 memoryClockRate(GHz): 1.076
pciBusID: 0000:81:00.0
totalMemory: 11.92GiB freeMemory: 11.80GiB
2019-03-29 14:10:03.792283: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1435] Adding visible gpu devices: 0, 1
2019-03-29 14:10:04.332448: I tensorflow/core/common_runtime/gpu/gpu_device.cc:923] Device interconnect StreamExecutor with strength 1 edge matrix:
2019-03-29 14:10:04.332508: I tensorflow/core/common_runtime/gpu/gpu_device.cc:929] 0 1
2019-03-29 14:10:04.332519: I tensorflow/core/common_runtime/gpu/gpu_device.cc:942] 0: N N
2019-03-29 14:10:04.332524: I tensorflow/core/common_runtime/gpu/gpu_device.cc:942] 1: N N
2019-03-29 14:10:04.333112: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1053] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 10816 MB memory) -> physical GPU (device: 0, name: GeForce GTX TITAN X, pci bus id: 0000:02:00.0, compute capability: 5.2)
2019-03-29 14:10:04.333703: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1053] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:1 with 11430 MB memory) -> physical GPU (device: 1, name: GeForce GTX TITAN X, pci bus id: 0000:81:00.0, compute capability: 5.2)
unpickled total 946 examples
examples -> 946
2019-03-29 14:10:07.096577: W tensorflow/core/framework/op_kernel.cc:1318] OP_REQUIRES failed at save_restore_v2_ops.cc:184 : Not found: Key generator/g_d1_bn/beta not found in checkpoint
Traceback (most recent call last):
File "/home/sjshyu/.conda/envs/py36/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1322, in _do_call
return fn(*args)
File "/home/sjshyu/.conda/envs/py36/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1307, in _run_fn
options, feed_dict, fetch_list, target_list, run_metadata)
File "/home/sjshyu/.conda/envs/py36/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1409, in _call_tf_sessionrun
run_metadata)
tensorflow.python.framework.errors_impl.NotFoundError: Key generator/g_d1_bn/beta not found in checkpoint
[[Node: save/RestoreV2 = RestoreV2[dtypes=[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/RestoreV2/tensor_names, save/RestoreV2/shape_and_slices)]]
[[Node: save/RestoreV2/_149 = _Recvclient_terminated=false, recv_device="/job:localhost/replica:0/task:0/device:GPU:0", send_device="/job:localhost/replica:0/task:0/device:CPU:0", send_device_incarnation=1, tensor_name="edge_154_save/RestoreV2", tensor_type=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:GPU:0"]]
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "infer.py", line 67, in
tf.app.run()
File "/home/sjshyu/.conda/envs/py36/lib/python3.6/site-packages/tensorflow/python/platform/app.py", line 126, in run
_sys.exit(main(argv))
File "infer.py", line 47, in main
save_dir=args.save_dir)
File "/home/sjshyu/Desktop/360315/model/unet.py", line 446, in infer
self.load_model(model_dir)
File "/home/sjshyu/Desktop/360315/model/unet.py", line 469, in load_model
self.restore_model(saver, model_dir)
File "/home/sjshyu/Desktop/360315/model/unet.py", line 357, in restore_model
saver.restore(self.sess, ckpt.model_checkpoint_path)
File "/home/sjshyu/.conda/envs/py36/lib/python3.6/site-packages/tensorflow/python/training/saver.py", line 1802, in restore
{self.saver_def.filename_tensor_name: save_path})
File "/home/sjshyu/.conda/envs/py36/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 900, in run
run_metadata_ptr)
File "/home/sjshyu/.conda/envs/py36/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1135, in _run
feed_dict_tensor, options, run_metadata)
File "/home/sjshyu/.conda/envs/py36/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1316, in _do_run
run_metadata)
File "/home/sjshyu/.conda/envs/py36/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1335, in _do_call
raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.NotFoundError: Key generator/g_d1_bn/beta not found in checkpoint
[[Node: save/RestoreV2 = RestoreV2[dtypes=[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/RestoreV2/tensor_names, save/RestoreV2/shape_and_slices)]]
[[Node: save/RestoreV2/_149 = _Recvclient_terminated=false, recv_device="/job:localhost/replica:0/task:0/device:GPU:0", send_device="/job:localhost/replica:0/task:0/device:CPU:0", send_device_incarnation=1, tensor_name="edge_154_save/RestoreV2", tensor_type=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:GPU:0"]]
Caused by op 'save/RestoreV2', defined at:
File "infer.py", line 67, in
tf.app.run()
File "/home/sjshyu/.conda/envs/py36/lib/python3.6/site-packages/tensorflow/python/platform/app.py", line 126, in run
_sys.exit(main(argv))
File "infer.py", line 47, in main
save_dir=args.save_dir)
File "/home/sjshyu/Desktop/360315/model/unet.py", line 446, in infer
self.load_model(model_dir)
File "/home/sjshyu/Desktop/360315/model/unet.py", line 468, in load_model
saver = tf.train.Saver(var_list=self.retrieve_generator_vars())
File "/home/sjshyu/.conda/envs/py36/lib/python3.6/site-packages/tensorflow/python/training/saver.py", line 1338, in init
self.build()
File "/home/sjshyu/.conda/envs/py36/lib/python3.6/site-packages/tensorflow/python/training/saver.py", line 1347, in build
self._build(self._filename, build_save=True, build_restore=True)
File "/home/sjshyu/.conda/envs/py36/lib/python3.6/site-packages/tensorflow/python/training/saver.py", line 1384, in _build
build_save=build_save, build_restore=build_restore)
File "/home/sjshyu/.conda/envs/py36/lib/python3.6/site-packages/tensorflow/python/training/saver.py", line 835, in _build_internal
restore_sequentially, reshape)
File "/home/sjshyu/.conda/envs/py36/lib/python3.6/site-packages/tensorflow/python/training/saver.py", line 472, in _AddRestoreOps
restore_sequentially)
File "/home/sjshyu/.conda/envs/py36/lib/python3.6/site-packages/tensorflow/python/training/saver.py", line 886, in bulk_restore
return io_ops.restore_v2(filename_tensor, names, slices, dtypes)
File "/home/sjshyu/.conda/envs/py36/lib/python3.6/site-packages/tensorflow/python/ops/gen_io_ops.py", line 1463, in restore_v2
shape_and_slices=shape_and_slices, dtypes=dtypes, name=name)
File "/home/sjshyu/.conda/envs/py36/lib/python3.6/site-packages/tensorflow/python/framework/op_def_library.py", line 787, in _apply_op_helper
op_def=op_def)
File "/home/sjshyu/.conda/envs/py36/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 3392, in create_op
op_def=op_def)
File "/home/sjshyu/.conda/envs/py36/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 1718, in init
self._traceback = self._graph._extract_stack() # pylint: disable=protected-access
NotFoundError (see above for traceback): Key generator/g_d1_bn/beta not found in checkpoint
[[Node: save/RestoreV2 = RestoreV2[dtypes=[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/RestoreV2/tensor_names, save/RestoreV2/shape_and_slices)]]
[[Node: save/RestoreV2/_149 = _Recvclient_terminated=false, recv_device="/job:localhost/replica:0/task:0/device:GPU:0", send_device="/job:localhost/replica:0/task:0/device:CPU:0", send_device_incarnation=1, tensor_name="edge_154_save/RestoreV2", tensor_type=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:GPU:0"]]
This is my contact information.
mail: henry19980520@gmail.com
I look forward to discussing with you.
The text was updated successfully, but these errors were encountered: