|
Thanks Rafal. Nice little trick there. Why is it that tf.shape and foo.get_shape return different types, Tensor and Dimension respectively? My intuition would suggest they should give me back the same thing. |
--
You received this message because you are subscribed to the Google Groups "Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss+unsubscribe@tensorflow.org.
To post to this group, send email to dis...@tensorflow.org.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/discuss/adcf6867-cd10-4f9b-b34c-80faf6248288%40tensorflow.org.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss+u...@tensorflow.org.
To post to this group, send email to dis...@tensorflow.org.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/discuss/adcf6867-cd10-4f9b-b34c-80faf6248288%40tensorflow.org.
Best,Dom
--
You received this message because you are subscribed to the Google Groups "Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss+u...@tensorflow.org.
To post to this group, send email to dis...@tensorflow.org.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/discuss/3e1fce10-2bab-4cfd-b2d4-e55b1d5f11a3%40tensorflow.org.
(1, 5) (?, 12) (?, ?)
where I would expect c.get_shape() to return (?,5).
If you think this is a genuine error I will post an issue on github. Thanks.
best,SteveIf you can come up with a small self-contained test case that fails, you should file an issue on github. It is possible that our shape inference isn't strong enough in this case, but I believe it should be (I may not be seeing something important, I haven't dug into the code).
On Sat, Aug 6, 2016 at 9:32 AM Steven Hutt <steven...@gmail.com> wrote:
It seems that tf.tile somehow loses shape information. If I do c = tf.tile(a, tf.pack([n,1])) where n = tf.shape(b)[0] and a is a variable of shape (1,5), then c.get_shape()[1] is ? rather than 5.--
On Tuesday, November 24, 2015 at 4:29:48 AM UTC, Dom Luna wrote:I'm trying to deal with the situation where my computation depends on the shape of the input.For example:n = foo.get_shape()[0] # n is used laterThe problem is n is always Dimension(None).TypeError: Expected int32, got Dimension(None) instead.Is there a way to get around this?Also, because this would in an indirect way solve the problem. Should I use tf.tile instead of a loop?In numpy loops are slow so tiling is preferred but it might be different in Tensorflow.thanks
You received this message because you are subscribed to the Google Groups "Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss+unsubscribe@tensorflow.org.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss+u...@tensorflow.org.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss+unsubscribe@tensorflow.org.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/discuss/CAF6DV8spTTPBBCExW2Ku7tZnZv7zsP9be938zZfRd%3Don-v%3DpRg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/discuss/CALW49E7r%3DDL3noOn%3DDzsN1NrhgmPu5wR2t9QXo-MCh4KAZG4fQ%40mail.gmail.com.