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

2 errors while building NodeDef 'tf_op_layer_Maximum_2/Maximum_2' using Op<name=Maximum; signature=x:T, y:T -> z:T ...Inconsistent values for attr 'T' DT_INT32 vs. DT_INT64 #39853

Closed
neilteng opened this issue May 25, 2020 · 7 comments
Assignees
Labels
comp:ops OPs related issues stat:awaiting response Status - Awaiting response from author TF 2.3 Issues related to TF 2.3 type:support Support issues

Comments

@neilteng
Copy link

neilteng commented May 25, 2020

System information
I am using colab to reproduce the issue and the ipynb is attached below.

You can collect some of this information using our environment capture
tf.version.GIT_VERSION: v1.12.1-32511-g2cc80a74f2
tf.version.VERSION: 2.3.0-dev20200525

Describe the current behavior
cannot load the saved tf model

Describe the expected behavior
successifully save the model and serve it like this example: https://github.com/tensorflow/transform/blob/master/examples/census_example_v2_test.py

Standalone code to reproduce the issue
https://colab.research.google.com/drive/1h2QIX_QZetIzSuG0J6lNWkHoSa2nnIyS?usp=sharing

Other info / logs Include any logs or source code that would be helpful to
diagnose the problem. If including tracebacks, please include the full
traceback. Large logs and files should be attached.

error is show in the last cell of the colab notebook.

WARNING:tensorflow:Layer LSTM_1 will not use cuDNN kernel since it doesn't meet the cuDNN kernel criteria. It will use generic GPU kernel as fallback when running on GPU
WARNING:tensorflow:Layer LSTM_1 will not use cuDNN kernel since it doesn't meet the cuDNN kernel criteria. It will use generic GPU kernel as fallback when running on GPU
WARNING:tensorflow:Layer LSTM_1 will not use cuDNN kernel since it doesn't meet the cuDNN kernel criteria. It will use generic GPU kernel as fallback when running on GPU
WARNING:tensorflow:Layer LSTM_1 will not use cuDNN kernel since it doesn't meet the cuDNN kernel criteria. It will use generic GPU kernel as fallback when running on GPU
WARNING:tensorflow:Layer LSTM_1 will not use cuDNN kernel since it doesn't meet the cuDNN kernel criteria. It will use generic GPU kernel as fallback when running on GPU
WARNING:tensorflow:Layer LSTM_1 will not use cuDNN kernel since it doesn't meet the cuDNN kernel criteria. It will use generic GPU kernel as fallback when running on GPU
WARNING:tensorflow:Layer LSTM_2 will not use cuDNN kernel since it doesn't meet the cuDNN kernel criteria. It will use generic GPU kernel as fallback when running on GPU
WARNING:tensorflow:Layer LSTM_2 will not use cuDNN kernel since it doesn't meet the cuDNN kernel criteria. It will use generic GPU kernel as fallback when running on GPU
WARNING:tensorflow:Layer LSTM_2 will not use cuDNN kernel since it doesn't meet the cuDNN kernel criteria. It will use generic GPU kernel as fallback when running on GPU
WARNING:tensorflow:Layer LSTM_2 will not use cuDNN kernel since it doesn't meet the cuDNN kernel criteria. It will use generic GPU kernel as fallback when running on GPU
WARNING:tensorflow:Layer LSTM_2 will not use cuDNN kernel since it doesn't meet the cuDNN kernel criteria. It will use generic GPU kernel as fallback when running on GPU
WARNING:tensorflow:Layer LSTM_2 will not use cuDNN kernel since it doesn't meet the cuDNN kernel criteria. It will use generic GPU kernel as fallback when running on GPU
---------------------------------------------------------------------------
InvalidArgumentError                      Traceback (most recent call last)
/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/ops.py in _create_c_op(graph, node_def, inputs, control_inputs, op_def)
   1819   try:
-> 1820     c_op = pywrap_tf_session.TF_FinishOperation(op_desc)
   1821   except errors.InvalidArgumentError as e:

InvalidArgumentError: 2 errors while building NodeDef 'tf_op_layer_Maximum_2/Maximum_2' using Op<name=Maximum; signature=x:T, y:T -> z:T; attr=T:type,allowed=[DT_BFLOAT16, DT_HALF, DT_FLOAT, DT_DOUBLE, DT_UINT8, DT_INT16, DT_INT32, DT_INT64]>:
Inconsistent values for attr 'T' DT_INT32 vs. DT_INT64
Inconsistent values for attr 'T' DT_INT32 vs. DT_INT64

During handling of the above exception, another exception occurred:

ValueError                                Traceback (most recent call last)
15 frames
/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/ops.py in _create_c_op(graph, node_def, inputs, control_inputs, op_def)
   1821   except errors.InvalidArgumentError as e:
   1822     # Convert to ValueError for backwards compatibility.
-> 1823     raise ValueError(str(e))
   1824 
   1825   return c_op

ValueError: 2 errors while building NodeDef 'tf_op_layer_Maximum_2/Maximum_2' using Op<name=Maximum; signature=x:T, y:T -> z:T; attr=T:type,allowed=[DT_BFLOAT16, DT_HALF, DT_FLOAT, DT_DOUBLE, DT_UINT8, DT_INT16, DT_INT32, DT_INT64]>:
Inconsistent values for attr 'T' DT_INT32 vs. DT_INT64
Inconsistent values for attr 'T' DT_INT32 vs. DT_INT64
@amahendrakar
Copy link
Contributor

Was able to reproduce the error. Please find the gist of it here. Thanks!

@amahendrakar amahendrakar added comp:ops OPs related issues TF 2.3 Issues related to TF 2.3 type:support Support issues and removed type:bug Bug labels May 26, 2020
@gowthamkpr gowthamkpr added the stat:awaiting tensorflower Status - Awaiting response from tensorflower label Jun 3, 2020
@karmel
Copy link

karmel commented Jun 11, 2020

Thanks for the report @neilteng . The example is fairly complex, and it is hard for us to pinpoint the issue. Can you remove the dependencies + get the example down to the simplest possible repro? That will allow us to more easily determine whether this is an issue with TFT, Beam, feature columns, graph mode, etc.

@neilteng
Copy link
Author

ok, I will try to reproduce the error with a simpler example.

@tensorflowbutler tensorflowbutler removed the stat:awaiting tensorflower Status - Awaiting response from tensorflower label Jun 25, 2020
@gowthamkpr
Copy link

@neilteng Were you able to reproduce the error with a simpler example?

@gowthamkpr gowthamkpr added the stat:awaiting response Status - Awaiting response from author label Jun 25, 2020
@neilteng
Copy link
Author

@neilteng Were you able to reproduce the error with a simpler example?

I think I accidentally delete the notebook.. And I cannot recover it.. If we are luck and you guys have a copy, I will work on it again. Otherwise, I can only close this issue for now.

@tensorflowbutler tensorflowbutler removed the stat:awaiting response Status - Awaiting response from author label Jun 27, 2020
@gowthamkpr
Copy link

@neilteng Please share us the notebook. Thanks!

@gowthamkpr gowthamkpr added the stat:awaiting response Status - Awaiting response from author label Jun 29, 2020
@neilteng
Copy link
Author

I think I accidentally delete the notebook.. And I cannot recover it.. If we are luck and you guys have a copy, I will work on it again. Otherwise, I can only close this issue for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:ops OPs related issues stat:awaiting response Status - Awaiting response from author TF 2.3 Issues related to TF 2.3 type:support Support issues
Projects
None yet
Development

No branches or pull requests

5 participants