-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Operator data type mismatch #8341
Comments
Thank you for bringing this issue to our attention and TensorFlow.js currently primarily focuses on Even if you don't specify data types for operators they don't necessarily have built-in default data types that work with various input types. Operators are typically designed to work with specific data types for numerical stability and performance reasons. The operator in your model (potentially To help us investigate further, if it's convenient, would you be able to share your GitHub repository or a code snippet containing the model (zipped format)? Additionally, if possible, could you please outline the steps to reproduce the behavior on our end? This information would greatly expedite our troubleshooting process. Thank you for your cooperation and patience. |
This issue has been marked stale because it has no recent activity since 7 days. It will be closed if no further activity occurs. Thank you. |
This issue was closed due to lack of activity after being marked stale for past 7 days. |
Operator data type mismatch
System information
Have I written custom code (as opposed to using a stock example script provided in TensorFlow.js): yes
OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Windows 10
TensorFlow.js installed from (npm or script link): script link
TensorFlow.js version (use command below): 3.19.0
Browser version: Microsoft Edge 125.0.2535.67(64 bit)、Google Chrome 125.0.6422.112 (64 bit)
Tensorflow.js Converter Version: -
Exception Report
{
"model_inf": "from:0 to:1 operator:identity from:0 to:4 operator:identity from:0 to:8 operator:identity from:0 to:9 operator:identity from:1 to:2 operator:identity from:1 to:7 operator:ReLU from:1 to:9 operator:CBR Block from:2 to:3 operator:ELU from:3 to:4 operator:ELU from:4 to:5 operator:identity from:5 to:6 operator:identity from:5 to:7 operator:PReLU from:6 to:7 operator:identity from:7 to:8 operator:identity from:7 to:9 operator:identity from:8 to:9 operator:identity ",
"error_message": "expected scalar type BFloat16 but found Float"
}
Bug Description
We do not specify any data types for any operator , and the input tensor data type is Float. My expected behavior: through the implicit type conversion declared by TensorFlow.js, the Float type would automatically be converted to the BFloat16 type. However, the conversion does not occur, and an exception was thrown directly. Is it possible that the operator uses a specific default data type when the operator parameter data type is not specified, and thus is incompatible with other data types?
The text was updated successfully, but these errors were encountered: