tensorflow / tfjs

A WebGL accelerated JavaScript library for training and deploying ML models.
https://js.tensorflow.org
Apache License 2.0
18.39k stars 1.92k forks source link

Input layer's input shape is changed by tf.layers.centerCrop height and width argument. #8325

Open linus87 opened 3 months ago

linus87 commented 3 months ago

Please make sure that this is a bug. As per our GitHub Policy, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:bug_template

System information

Describe the current behavior InputLayer's input shape is changed by centerCrop layer.

Describe the expected behavior Change arbitrary size image into specified image.

Standalone code to reproduce the issue Provide a reproducible test case that is the bare minimum necessary to generate the problem. If possible, please share a link to Colab/CodePen/any notebook.

const imageSize = 200; const model = tf.sequential(); model.add(tf.layers.inputLayer({batchInputShape: [1, null, null, 3]})); model.add(tf.layers.centerCrop({height: imageSize, width: imageSize})); model.summary();

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.

image
gaikwadrahul8 commented 3 months ago

Hi, @linus87

Thank you for bringing this issue to our attention and I'm able to replicate the same behavior from my end which you reported in the issue template so we'll have to dig more into this and will update you soon, for reference I've added screenshot below :

image

Thank you for your cooperation and patience.

github-actions[bot] commented 2 months ago

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.