Skip to content
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

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

Open
linus87 opened this issue Jul 5, 2024 · 2 comments
Assignees
Labels
comp:core stale type:bug Something isn't working

Comments

@linus87
Copy link

linus87 commented Jul 5, 2024

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

  • 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): MAC 14.2.1 (23C71)
  • Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device:
  • TensorFlow.js installed from (npm or script link): script link
  • TensorFlow.js version (use command below): 4.20.0
  • Browser version: Chrome 126.0.6478.127
  • Tensorflow.js Converter Version:

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

@linus87 linus87 added the type:bug Something isn't working label Jul 5, 2024
@gaikwadrahul8 gaikwadrahul8 self-assigned this Jul 5, 2024
@gaikwadrahul8
Copy link
Contributor

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.

Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:core stale type:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants