Issue 1:
im trying to run the voice recognition example

for some reason specifying a clip_duration_ms diffren from 1000 generate an error while freezing the model.

so running

python tensorflow/examples/speech_commands/freeze.py

--wanted_words=yes

--clip_duration_ms=2800 --sample_rate=16000 --window_size_ms=20

--start_checkpoint=/notebooks/yesmodel/conv.ckpt-10

--output_file=/notebooks/yesmodel/conv_frozen.pb

generate the following message

Error: Assign requires shapes of both tensors to match. lhs shape= [320000,3] rhs shape= [62720,3]

any idea what im doing wrong?

Issue 2:
System information

Have I written custom code (as opposed to using a stock example script provided in TensorFlow):No. I am running the Audio recognition tutorial

OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Ubuntu 14.04

TensorFlow installed from (source or binary):source

TensorFlow version (use command below): 1.3.0

Python version: 3.6

Bazel version (if compiling from source):0.6.0

CUDA/cuDNN version:

GPU model and memory:

Exact command to reproduce:python tensorflow/examples/speech_commands/freeze.py

--start_checkpoint=/tmp/speech_commands_train/conv.ckpt-18000

--output_file=/tmp/my_frozen_graph.pb

I am asking about the error (attached below) here(rather than on stackoverflow) because of this related issue #5492 . I want to know if my error can be resolved by tweaking the validate_shape parameter,by setting it to false? . If not, please suggest alternatives.

The error is as follows:

Traceback (most recent call last):

File "/home/cogknit/anaconda3/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1321, in _do_call

return fn(*args)

File "/home/cogknit/anaconda3/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1300, in _run_fn

status, run_metadata)

File "/home/cogknit/anaconda3/lib/python3.6/contextlib.py", line 89, in exit

next(self.gen)

File "/home/cogknit/anaconda3/lib/python3.6/site-packages/tensorflow/python/framework/errors_impl.py", line 467, in raise_exception_on_not_ok_status

c_api.TF_GetCode(status.status))

tensorflow.python.framework.errors_impl.InvalidArgumentError: Assign requires shapes of both tensors to match. lhs shape= [12] rhs shape= [3]

[[Node: save/Assign_5 = Assign[T=DT_FLOAT, _class=["loc:@Variable_5"], use_locking=true, validate_shape=true, _device="/job:localhost/replica:0/task:0/cpu:0"](Variable_5, save/RestoreV2_5)]]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "tensorflow/examples/speech_commands/freeze.py", line 180, in

tf.app.run(main=main, argv=[sys.argv[0]] + unparsed)

File "/home/cogknit/anaconda3/lib/python3.6/site-packages/tensorflow/python/platform/app.py", line 48, in run

_sys.exit(main(_sys.argv[:1] + flags_passthrough))

File "tensorflow/examples/speech_commands/freeze.py", line 117, in main

models.load_variables_from_checkpoint(sess, FLAGS.start_checkpoint)

File "/home/cogknit/tensorflow/tensorflow/examples/speech_commands/models.py", line 123, in load_variables_from_checkpoint

saver.restore(sess, start_checkpoint)

File "/home/cogknit/anaconda3/lib/python3.6/site-packages/tensorflow/python/training/saver.py", line 1657, in restore

{self.saver_def.filename_tensor_name: save_path})

File "/home/cogknit/anaconda3/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 889, in run

run_metadata_ptr)

File "/home/cogknit/anaconda3/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1118, in _run

feed_dict_tensor, options, run_metadata)

File "/home/cogknit/anaconda3/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1315, in _do_run

options, run_metadata)

File "/home/cogknit/anaconda3/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1334, in _do_call

raise type(e)(node_def, op, message)

tensorflow.python.framework.errors_impl.InvalidArgumentError: Assign requires shapes of both tensors to match. lhs shape= [12] rhs shape= [3]

[[Node: save/Assign_5 = Assign[T=DT_FLOAT, _class=["loc:@Variable_5"], use_locking=true, validate_shape=true, _device="/job:localhost/replica:0/task:0/cpu:0"](Variable_5, save/RestoreV2_5)]]

Caused by op 'save/Assign_5', defined at:

File "tensorflow/examples/speech_commands/freeze.py", line 180, in

tf.app.run(main=main, argv=[sys.argv[0]] + unparsed)

File "/home/cogknit/anaconda3/lib/python3.6/site-packages/tensorflow/python/platform/app.py", line 48, in run

_sys.exit(main(_sys.argv[:1] + flags_passthrough))

File "tensorflow/examples/speech_commands/freeze.py", line 117, in main

models.load_variables_from_checkpoint(sess, FLAGS.start_checkpoint)

File "/home/cogknit/tensorflow/tensorflow/examples/speech_commands/models.py", line 122, in load_variables_from_checkpoint

saver = tf.train.Saver(tf.global_variables())

File "/home/cogknit/anaconda3/lib/python3.6/site-packages/tensorflow/python/training/saver.py", line 1214, in init

self.build()

File "/home/cogknit/anaconda3/lib/python3.6/site-packages/tensorflow/python/training/saver.py", line 1223, in build

self._build(self._filename, build_save=True, build_restore=True)

File "/home/cogknit/anaconda3/lib/python3.6/site-packages/tensorflow/python/training/saver.py", line 1259, in _build

build_save=build_save, build_restore=build_restore)

File "/home/cogknit/anaconda3/lib/python3.6/site-packages/tensorflow/python/training/saver.py", line 747, in _build_internal

restore_sequentially, reshape)

File "/home/cogknit/anaconda3/lib/python3.6/site-packages/tensorflow/python/training/saver.py", line 435, in _AddRestoreOps

assign_ops.append(saveable.restore(tensors, shapes))

File "/home/cogknit/anaconda3/lib/python3.6/site-packages/tensorflow/python/training/saver.py", line 160, in restore

self.op.get_shape().is_fully_defined())

File "/home/cogknit/anaconda3/lib/python3.6/site-packages/tensorflow/python/ops/state_ops.py", line 276, in assign

validate_shape=validate_shape)

File "/home/cogknit/anaconda3/lib/python3.6/site-packages/tensorflow/python/ops/gen_state_ops.py", line 56, in assign

use_locking=use_locking, name=name)

File "/home/cogknit/anaconda3/lib/python3.6/site-packages/tensorflow/python/framework/op_def_library.py", line 787, in _apply_op_helper

op_def=op_def)

File "/home/cogknit/anaconda3/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 3082, in create_op

op_def=op_def)

File "/home/cogknit/anaconda3/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 1632, in init

self._traceback = self._graph._extract_stack() # pylint: disable=protected-access

InvalidArgumentError (see above for traceback): Assign requires shapes of both tensors to match. lhs shape= [12] rhs shape= [3]

[[Node: save/Assign_5 = Assign[T=DT_FLOAT, _class=["loc:@Variable_5"], use_locking=true, validate_shape=true, _device="/job:localhost/replica:0/task:0/cpu:0"](Variable_5, save/RestoreV2_5)]]