-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Image channel size is lost after resizing layer. #8324
Comments
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 issue and will update you soon, for reference I've added screenshot below : Thank you for your cooperation and patience. |
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. |
Hi, @linus87 I apologize for the delay in my response and as far I know, the image channel size (number of color channels) is not actually lost after the resizing layer in your TensorFlow.js model, even though In your code, the resizing layer The To verify that the channel information is preserved, you can try the following:
This will confirm that even though To confirm the preservation of no. of color channels, could you please run the model and verify if the output shape from If I have missed something here please let me know. Thank you for your cooperation and patience. |
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
Channel dimension size is lost.
Describe the expected behavior
Image is resized, but the channel is the same as input.
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 model = tf.sequential();
const imageSize = 200;
model.add(tf.layers.inputLayer({batchInputShape: [1, null, null, 3]}));
model.add(tf.layers.resizing({height: imageSize, width: imageSize, interpolation: 'bilinear', cropToAspectRatio: true}));
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.
The text was updated successfully, but these errors were encountered: