Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running the train.py file gives an error. I don't know what to do. Please help. tensorflow-gpu==1.15.0, python==3.7.12 #62

Open
capp-adocia opened this issue Oct 17, 2024 · 0 comments

Comments

@capp-adocia
Copy link

Total size of variables: 1558304
Total bytes of variables: 6233216
WARNING:tensorflow:From C:\Users\Administrator\Desktop\AnimeGANv3-master\AnimeGANv3_hayao.py:170: The name tf.global_variables_initializer is deprecated. Please use tf.compat.v1.global_variables_initializer instead.      

WARNING:tensorflow:From C:\Users\Administrator\Desktop\AnimeGANv3-master\AnimeGANv3_hayao.py:174: The name tf.train.Saver is deprecated. Please use tf.compat.v1.train.Saver instead.

 [*] Reading checkpoints...
 [*] Failed to find a checkpoint
 [!] Load failed...
Traceback (most recent call last):
  File "C:\Application\Anconda\envs\tf-gpu\lib\site-packages\tensorflow_core\python\client\session.py", line 305, in __init__
    fetch, allow_tensor=True, allow_operation=True))
  File "C:\Application\Anconda\envs\tf-gpu\lib\site-packages\tensorflow_core\python\framework\ops.py", line 3607, in as_graph_element
    return self._as_graph_element_locked(obj, allow_tensor, allow_operation)
  File "C:\Application\Anconda\envs\tf-gpu\lib\site-packages\tensorflow_core\python\framework\ops.py", line 3696, in _as_graph_element_locked
    (type(obj).__name__, types_str))
TypeError: Can not convert a DatasetV1Adapter into a Tensor or Operation.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "train.py", line 89, in <module>
    train()
  File "train.py", line 83, in train
    gan.train()
  File "C:\Users\Administrator\Desktop\AnimeGANv3-master\AnimeGANv3_hayao.py", line 197, in train
    real_photo, anime_, anime_smooth_ = self.sess.run([real_photo_op, anime_img_op, anime_smooth_op])
  File "C:\Application\Anconda\envs\tf-gpu\lib\site-packages\tensorflow_core\python\client\session.py", line 956, in run
    run_metadata_ptr)
  File "C:\Application\Anconda\envs\tf-gpu\lib\site-packages\tensorflow_core\python\client\session.py", line 1165, in _run
    self._graph, fetches, feed_dict_tensor, feed_handles=feed_handles)
  File "C:\Application\Anconda\envs\tf-gpu\lib\site-packages\tensorflow_core\python\client\session.py", line 474, in __init__
    self._fetch_mapper = _FetchMapper.for_fetch(fetches)
  File "C:\Application\Anconda\envs\tf-gpu\lib\site-packages\tensorflow_core\python\client\session.py", line 266, in for_fetch
    return _ListFetchMapper(fetch)
  File "C:\Application\Anconda\envs\tf-gpu\lib\site-packages\tensorflow_core\python\client\session.py", line 375, in __init__
    self._mappers = [_FetchMapper.for_fetch(fetch) for fetch in fetches]
  File "C:\Application\Anconda\envs\tf-gpu\lib\site-packages\tensorflow_core\python\client\session.py", line 375, in <listcomp>
    self._mappers = [_FetchMapper.for_fetch(fetch) for fetch in fetches]
  File "C:\Application\Anconda\envs\tf-gpu\lib\site-packages\tensorflow_core\python\client\session.py", line 276, in for_fetch
    return _ElementFetchMapper(fetches, contraction_fn)
  File "C:\Application\Anconda\envs\tf-gpu\lib\site-packages\tensorflow_core\python\client\session.py", line 309, in __init__
    (fetch, type(fetch), str(e)))
TypeError: Fetch argument <DatasetV1Adapter shapes: (<unknown>, <unknown>), types: (tf.float32, tf.float32)> has invalid type <class 'tensorflow.python.data.ops.dataset_ops.DatasetV1Adapter'>, must be a string or Tensor. 
(Can not convert a DatasetV1Adapter into a Tensor or Operation.)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant