tfjs: Improve shape mismatch error in layers.
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].
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 19 (5 by maintainers)
I think this is issue solved @gaikwadrahul8 already fixed on
@tensorflow/tfjs@4.10.0https://github.com/tensorflow/tfjs/blob/tfjs-v4.10.0/tfjs-layers/src/engine/training.ts#L170@sourabh112 sure no problem! @rthadur i’ll have a go at this issue then
I will work on this.