Skip to content

Conversation

@fsx950223
Copy link
Member

Sometimes miss Tensor shape in Graph mode.
Set shape explicitly.

@bhack
Copy link
Contributor

bhack commented May 15, 2020

Does def cutout( require @tf.function decoration?

@bhack
Copy link
Contributor

bhack commented May 15, 2020

@fsx950223 Do you have a minimal code to reproduce #1824?

Edit: I am a little bit worried about "sometimes miss.."

@fsx950223
Copy link
Member Author

fsx950223 commented May 16, 2020

Since Dataset runs map function in Graph mode. I won't add a test code.
You could try with reporter's minimal code.
Batch Size is None(Tensor shape is (None, 224, 224, 3)) after call cutout and after call tf.squeeze the Tensor shape misses(Tensor shape is None or unknown).
I have to explicitly set shape(Tensor shape is (1, 224, 224, 3)).

@bhack
Copy link
Contributor

bhack commented May 16, 2020

Yes I saw that his squeeze example the Tensor shape misses.
Have you seen: #1824 (comment)

@fsx950223
Copy link
Member Author

fsx950223 commented May 16, 2020

Yes I saw that his squeeze example the Tensor shape misses.
Have you seen: #1824 (comment)

It won't change anything.
Maybe it's useful to users but not ops.
For details:
#1338 (comment)

@bhack
Copy link
Contributor

bhack commented May 16, 2020

It won't change anything.
Maybe it's useful to users but not ops.

This why I asked to you before what do you mean with "sometimes".
Do you mean that Is the case when an user need to use tf.squeeze over the Op result? Or that tf.squeeze Is not working correctly?

@fsx950223
Copy link
Member Author

fsx950223 commented May 16, 2020

It won't change anything.
Maybe it's useful to users but not ops.

This why I asked to you before what do you mean with "sometimes".
Do you mean that Is the case when an user need to use tf.squeeze over the Op result? Or that tf.squeeze Is not working correctly?

We don't support 3D and 2D images after we discussed at #1338 (comment) and data_format too.
We have spent lots of time on it.
But now, we have to change it back?

@fsx950223
Copy link
Member Author

fsx950223 commented May 16, 2020

How do you process images with batch_size>1 without set shape again?

@bhack
Copy link
Contributor

bhack commented May 16, 2020

Ok for 3D and 2D images I've not followed that review but just the new thread at #1825

Copy link
Member

@WindQAQ WindQAQ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the late reply. I believe this is a right fix so I am going to merge this first. Let's open other issues for further discussion. Thank you all!

@WindQAQ WindQAQ merged commit c06e9ab into tensorflow:master May 24, 2020
ashutosh1919 pushed a commit to ashutosh1919/addons that referenced this pull request Jul 12, 2020
jrruijli pushed a commit to jrruijli/addons that referenced this pull request Dec 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants