-
Notifications
You must be signed in to change notification settings - Fork 28
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
error in input shape when call freeze.freeze #12
Comments
I tried to modify the codes and variables. I got other error like below save_checkpoint='../logs&checkpoint/Conv/ckpt-15300.index'
|
I fixed the previos error by changing the
to
|
also sometime I got this error Traceback (most recent call last): if I changed decoded_sample_data to decoded_sample_data=tf.reshape(decoded_sample_data,shape=([model_settings['desired_samples'],1])) |
after I complete the training and call freeze.freeze I got this error:
File "/home/hussain/anaconda3/lib/python3.5/site-packages/tensorflow/python/framework/common_shapes.py", line 686, in _call_cpp_shape_fn_impl
input_tensors_as_shapes, status)
File "/home/hussain/anaconda3/lib/python3.5/site-packages/tensorflow/python/framework/errors_impl.py", line 473, in exit
c_api.TF_GetCode(self.status.status))
tensorflow.python.framework.errors_impl.InvalidArgumentError: Shape must be rank 1 but is rank 0 for 'Reshape' (op: 'Reshape') with input shapes: [?,1], [].
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "", line 151, in
File "/home/hussain/anaconda3/lib/python3.5/site-packages/tensorflow/python/platform/app.py", line 48, in run
_sys.exit(main(_sys.argv[:1] + flags_passthrough))
File "", line 146, in main
File "../libs/classification/freeze.py", line 163, in freeze_graph
FLAGS.dct_coefficient_count, model_architecture,model_size_info)
File "../libs/classification/freeze.py", line 73, in create_inference_graph
decoded_sample_data=tf.reshape(decoded_sample_data,shape=(model_settings['desired_samples']))
File "/home/hussain/anaconda3/lib/python3.5/site-packages/tensorflow/python/ops/gen_array_ops.py", line 3938, in reshape
"Reshape", tensor=tensor, shape=shape, name=name)
File "/home/hussain/anaconda3/lib/python3.5/site-packages/tensorflow/python/framework/op_def_library.py", line 787, in _apply_op_helper
op_def=op_def)
File "/home/hussain/anaconda3/lib/python3.5/site-packages/tensorflow/python/framework/ops.py", line 2958, in create_op
set_shapes_for_outputs(ret)
File "/home/hussain/anaconda3/lib/python3.5/site-packages/tensorflow/python/framework/ops.py", line 2209, in set_shapes_for_outputs
shapes = shape_func(op)
File "/home/hussain/anaconda3/lib/python3.5/site-packages/tensorflow/python/framework/ops.py", line 2159, in call_with_requiring
return call_cpp_shape_fn(op, require_shape_fn=True)
File "/home/hussain/anaconda3/lib/python3.5/site-packages/tensorflow/python/framework/common_shapes.py", line 627, in call_cpp_shape_fn
require_shape_fn)
File "/home/hussain/anaconda3/lib/python3.5/site-packages/tensorflow/python/framework/common_shapes.py", line 691, in _call_cpp_shape_fn_impl
raise ValueError(err.message)
ValueError: Shape must be rank 1 but is rank 0 for 'Reshape' (op: 'Reshape') with input shapes: [?,1], [].
The text was updated successfully, but these errors were encountered: