tensorflow / gan

Tooling for GANs in TensorFlow
Apache License 2.0
927 stars 246 forks source link

Getting error "`tfgan.gan_model` doesn't work when executing eagerly." on cifar example #31

Closed Arpit2601 closed 4 years ago

Arpit2601 commented 4 years ago

On running python cifar/train.py I'm getting the following error:

`WARNING:tensorflow:From /home/arpit/Desktop/github_repos/gan/tensorflow_gan/python/estimator/tpu_gan_estimator.py:42: The name tf.estimator.tpu.TPUEstimator is deprecated. Please use tf.compat.v1.estimator.tpu.TPUEstimator instead.

2020-07-10 22:06:53.429745: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libcuda.so.1'; dlerror: libcuda.so.1: cannot open shared object file: No such file or directory 2020-07-10 22:06:53.429773: E tensorflow/stream_executor/cuda/cuda_driver.cc:313] failed call to cuInit: UNKNOWN ERROR (303) 2020-07-10 22:06:53.429788: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:156] kernel driver does not appear to be running on this host (arpit-Inspiron-5567): /proc/driver/nvidia/version does not exist 2020-07-10 22:06:53.430025: I tensorflow/core/platform/cpu_feature_guard.cc:143] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA 2020-07-10 22:06:53.456683: I tensorflow/core/platform/profile_utils/cpu_utils.cc:102] CPU Frequency: 2699905000 Hz 2020-07-10 22:06:53.456991: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x7fd6d0000b60 initialized for platform Host (this does not guarantee that XLA will be used). Devices: 2020-07-10 22:06:53.457020: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version I0710 22:06:53.459665 140562905868096 dataset_info.py:361] Load dataset info from /home/arpit/tensorflow_datasets/cifar10/3.0.2 I0710 22:06:53.461327 140562905868096 dataset_builder.py:282] Reusing dataset cifar10 (/home/arpit/tensorflow_datasets/cifar10/3.0.2) I0710 22:06:53.461479 140562905868096 dataset_builder.py:477] Constructing tf.data.Dataset for split train, from /home/arpit/tensorflow_datasets/cifar10/3.0.2 2020-07-10 22:06:54.561262: W tensorflow/core/kernels/data/cache_dataset_ops.cc:794] The calling iterator did not fully read the dataset being cached. In order to avoid unexpected truncation of the dataset, the partially cached contents of the dataset will be discarded. This can happen if you have an input pipeline similar to dataset.cache().take(k).repeat(). You should use dataset.take(k).cache().repeat() instead. 2020-07-10 22:06:54.562604: W tensorflow/core/kernels/data/cache_dataset_ops.cc:794] The calling iterator did not fully read the dataset being cached. In order to avoid unexpected truncation of the dataset, the partially cached contents of the dataset will be discarded. This can happen if you have an input pipeline similar to dataset.cache().take(k).repeat(). You should use dataset.take(k).cache().repeat() instead. Traceback (most recent call last): File "cifar/train.py", line 61, in app.run(main) File "/home/arpit/Desktop/github_repos/gan/venv/lib/python3.8/site-packages/absl/app.py", line 299, in run _run_main(main, args) File "/home/arpit/Desktop/github_repos/gan/venv/lib/python3.8/site-packages/absl/app.py", line 250, in _run_main sys.exit(main(argv)) File "cifar/train.py", line 56, in main train_lib.train(hparams) File "/home/arpit/Desktop/github_repos/gan/tensorflow_gan/examples/cifar/train_lib.py", line 62, in train gan_model = tfgan.gan_model( File "/home/arpit/Desktop/github_repos/gan/tensorflow_gan/python/train.py", line 102, in gan_model raise ValueError('tfgan.gan_model doesn\'t work when executing eagerly.') ValueError: tfgan.gan_model doesn't work when executing eagerly. `

joel-shor commented 4 years ago

This should be fixed with https://github.com/tensorflow/gan/commit/de4b8da3853058ea380a6152bd3bd454013bf619.