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

ValueError: Tensor adanet/iteration_0/ensemble_t0_3_self_built_cnn/weighted_subnetwork_0/subnetwork/batch_normalization_2/moving_mean is not found in /data4/data/adanet/modelZoo/2018_12_10_11_23/model.ckpt-7500 checkpoint #45

Open
Npccc opened this issue Dec 10, 2018 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@Npccc
Copy link

Npccc commented Dec 10, 2018

Hello,
I am using tf 1.12.0,Python 2.7.15,I run my own built subnetwork under the fashion mnist dataset,but I am getting the warning:

Traceback (most recent call last):
File "class_builtCNN.py", line 39, in
steps=None))
File "/home/guost/anaconda2/lib/python2.7/site-packages/tensorflow/python/estimator/training.py", line 471, in train_and_evaluate
return executor.run()
File "/home/guost/anaconda2/lib/python2.7/site-packages/tensorflow/python/estimator/training.py", line 610, in run
return self.run_local()
File "/home/guost/anaconda2/lib/python2.7/site-packages/tensorflow/python/estimator/training.py", line 711, in run_local
saving_listeners=saving_listeners)
File "/home/guost/Adanet/Newversion/1206/adanet-master/adanet/core/estimator.py", line 499, in train
self._prepare_next_iteration(input_fn)
File "/home/guost/Adanet/Newversion/1206/adanet-master/adanet/core/estimator.py", line 618, in _prepare_next_iteration
params)
File "/home/guost/Adanet/Newversion/1206/adanet-master/adanet/core/estimator.py", line 578, in _call_adanet_model_fn
self._adanet_model_fn(features, labels, mode, params)
File "/home/guost/Adanet/Newversion/1206/adanet-master/adanet/core/estimator.py", line 1093, in _adanet_model_fn
tf.train.warm_start(latest_checkpoint, vars_to_warm_start=[".*"])
File "/home/guost/anaconda2/lib/python2.7/site-packages/tensorflow/python/training/warm_starting_util.py", line 463, in warm_start
_warm_start_var(variable, ckpt_to_initialize_from, prev_var_name)
File "/home/guost/anaconda2/lib/python2.7/site-packages/tensorflow/python/training/warm_starting_util.py", line 181, in _warm_start_var
checkpoint_utils.init_from_checkpoint(prev_ckpt, {prev_tensor_name: var})
File "/home/guost/anaconda2/lib/python2.7/site-packages/tensorflow/python/training/checkpoint_utils.py", line 187, in init_from_checkpoint
_init_from_checkpoint, ckpt_dir_or_file, assignment_map)
File "/home/guost/anaconda2/lib/python2.7/site-packages/tensorflow/python/training/distribute.py", line 1053, in merge_call
return self._merge_call(merge_fn, *args, **kwargs)
File "/home/guost/anaconda2/lib/python2.7/site-packages/tensorflow/python/training/distribute.py", line 1061, in _merge_call
return merge_fn(self._distribution_strategy, *args, **kwargs)
File "/home/guost/anaconda2/lib/python2.7/site-packages/tensorflow/python/training/checkpoint_utils.py", line 216, in _init_from_checkpoint
tensor_name_in_ckpt, ckpt_dir_or_file, variable_map
ValueError: Tensor adanet/iteration_0/ensemble_t0_3_self_built_cnn/weighted_subnetwork_0/subnetwork/batch_normalization_2/moving_mean is not found in /data4/data/adanet/modelZoo/2018_12_10_11_23/model.ckpt-7500 checkpoint

Any suggestions on how to solve the problem or avoid it in the first place?
Thank you so much
@cweill

@cweill
Copy link
Contributor

cweill commented Dec 10, 2018

Interesting. Are you using tf.keras.layers or tf.layers? I think I ran into this issue with tf.keras.layers because they handle variable scoping differently.

@Npccc
Copy link
Author

Npccc commented Dec 19, 2018

You are right,thank you @cweill

@cweill cweill self-assigned this Dec 19, 2018
@cweill cweill added the bug Something isn't working label Dec 19, 2018
@cweill
Copy link
Contributor

cweill commented Dec 19, 2018

Thank you, for confirming @Npccc. We'll look into this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants