Skip to content

Improve shape mismatch error in layers. #1165

Closed
@nsthorat

Description

@nsthorat

When calling fit, we get errors like this:

tf-layers.esm.js:17 Uncaught (in promise) Error: Error when checking target: expected sampling_layer_SamplingLayer1 to have shape [,4], but got array with shape [1,512].

This is mostly fine, but it would be good to log the name of the other layer that this connects with that is causing the error.

Maybe also instead of "target" we could say something like "output"? How about this error message:

sampling_layer_SamplingLayer1 is expected to have an input shape of [null, 4] but the output of previous_layer has an output shape of [null, 512].

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions