Skip to content

Tutorial not working in Colab #32

@ZvikaZ

Description

@ZvikaZ

Hi.
I've tried running the TF-GAN Tutorial in Colab, and it's not working.

Few errors (there are more...):

SyntaxError                               Traceback (most recent call last)
/usr/local/lib/python3.6/dist-packages/tensorflow/python/autograph/pyct/parser.py in _attempt_to_parse_lambda_source(source, original_source, future_features, try_fallback)
    157   try:
--> 158     return parse(source, preamble_len=len(future_features)), source
    159 

30 frames
SyntaxError: invalid syntax (<unknown>, line 1)

During handling of the above exception, another exception occurred:

ValueError                                Traceback (most recent call last)
ValueError: expected exactly one node node, found []

During handling of the above exception, another exception occurred:

UnsupportedLanguageElementError           Traceback (most recent call last)
UnsupportedLanguageElementError: could not parse the source code:

              .map(lambda _: tf.random_normal([bs, nd])))

This error may be avoided by creating the lambda in a standalone statement.


During handling of the above exception, another exception occurred:

AttributeError                            Traceback (most recent call last)
<ipython-input-2-b8c4c89fd469> in <lambda>(_)
     12 
     13   noise_ds = (tf.data.Dataset.from_tensors(0).repeat()
---> 14               .map(lambda _: tf.random_normal([bs, nd])))
     15 
     16   if just_noise:

AttributeError: module 'tensorflow' has no attribute 'random_normal'

I run from this URL: https://colab.research.google.com/github/tensorflow/gan/blob/master/tensorflow_gan/examples/colab_notebooks/tfgan_tutorial.ipynb#scrollTo=zEhgLuGo8OGc
Modified runtime to GPU, and started running the cells.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions