Skip to content

Operator data type mismatch #8341

@ghost

Description

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?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions