Colabtools: InvalidArgumentError: ValueError: `generator` yielded an element of shape

Created on 21 Aug 2019  路  10Comments  路  Source: googlecolab/colabtools

Running step2 of the below url is leading to compilation error in train model step(colab tool)
https://codelabs.developers.google.com/codelabs/recognize-flowers-with-tensorflow-on-android/#1

code lab compilation url :
https://colab.research.google.com/github/tensorflow/examples/blob/master/community/en/flowers_tf_lite.ipynb#scrollTo=JsaRFlZ9B6WK&uniqifier=1

error stacktrace
InvalidArgumentError: ValueError: generator yielded an element of shape (59, 224, 224, 3) where an element of shape (64, 224, 224, 3) was expected.
Traceback (most recent call last):

File "/usr/local/lib/python3.6/dist-packages/tensorflow_core/python/ops/script_ops.py", line 235, in call
ret = func(*args)

File "/usr/local/lib/python3.6/dist-packages/tensorflow_core/python/data/ops/dataset_ops.py", line 630, in generator_py_func
"of shape %s was expected." % (ret_array.shape, expected_shape))

ValueError: generator yielded an element of shape (59, 224, 224, 3) where an element of shape (64, 224, 224, 3) was expected.

[[{{node PyFunc}}]] [Op:IteratorGetNextSync]

Error snapshot is also attached
error_snapshot

All 10 comments

@yashk2810 or @markdaoust do either of you happen to know who owns this tutorial?

There is a fix in-flight. Should be submitted by monday (waiting on approval).

Think that it could be a bug from tf-nightly(-gpu)-2.0 since I installed with standard tensorflow 1.14 and it works. It worked here, I just had to keep an eye on the variables of history.

So currently is it impossible to complete "Recognize Flowers with TensorFlow on Android" codelab?

The fix is submitted. Can you try it out now?

Actually, it looks like it was not updated.

I'll fix it right now.

@yashk2810 I tried again it right now - it is not working.
Screen Shot 2019-09-04 at 7 05 08 PM

This should be fixed now, sorry about the delay.

@MarkDaoust everything works. Thank you! I suppose this issue can be closed.

thanks all!

Was this page helpful?
0 / 5 - 0 ratings