Skip to content

module 'tensorflow' has no attribute 'Dataset' #45

Description

@AlexRMU

!python watermarks.py --image assets/cat.png --selection assets/cat-selection.png --dataset=dataset_cifar --batch_size 32

WARNING:tensorflow:From watermarks.py:298: The name tf.app.run is deprecated. Please use tf.compat.v1.app.run instead.

WARNING:tensorflow:From watermarks.py:282: The name tf.Session is deprecated. Please use tf.compat.v1.Session instead.

W1109 16:02:22.012408 140498710181760 deprecation_wrapper.py:119] From watermarks.py:282: The name tf.Session is deprecated. Please use tf.compat.v1.Session instead.

2020-11-09 16:02:22.025011: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2020-11-09 16:02:22.028714: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2249995000 Hz
2020-11-09 16:02:22.028934: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x32032c0 executing computations on platform Host. Devices:
2020-11-09 16:02:22.028963: I tensorflow/compiler/xla/service/service.cc:175]   StreamExecutor device (0): <undefined>, <undefined>
Traceback (most recent call last):
  File "watermarks.py", line 298, in <module>
    tf.app.run()
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/platform/app.py", line 40, in run
    _run(main=main, argv=argv, flags_parser=_parse_flags_tolerate_undef)
  File "/usr/local/lib/python3.6/dist-packages/absl/app.py", line 300, in run
    _run_main(main, args)
  File "/usr/local/lib/python3.6/dist-packages/absl/app.py", line 251, in _run_main
    sys.exit(main(argv))
  File "watermarks.py", line 289, in main
    lambda: dataset_paths([FLAGS.selection]))
  File "watermarks.py", line 117, in inference
    next_image, iterator_init = dataset()
  File "watermarks.py", line 286, in <lambda>
    lambda: dataset_paths([FLAGS.image]),
  File "/content/cnn-watermark-removal/dataset.py", line 50, in dataset_paths
    dataset = tf.Dataset.from_tensor_slices(tf.constant(paths))
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/util/deprecation_wrapper.py", line 106, in __getattr__
    attr = getattr(self._dw_wrapped_module, name)
AttributeError: module 'tensorflow' has no attribute 'Dataset'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions