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

train.py 1 throwing error on slice_input_producer #94

Open
Talkashie opened this issue Apr 2, 2021 · 3 comments
Open

train.py 1 throwing error on slice_input_producer #94

Talkashie opened this issue Apr 2, 2021 · 3 comments

Comments

@Talkashie
Copy link

AttributeError: module 'tensorflow._api.v2.train' has no attribute 'slice_input_producer'

I've seen several people here post about this but have yet to see a solution. I've tried downgrading python, tensorflow, pip, everything. I've also tried tf.disable_v2_behavior() and import tensorflow.compat.v1 as tf, both of which did not help.

If anyone has a solution to this it'd be greatly appreciated.

@Evanwb50
Copy link

Evanwb50 commented Jul 9, 2021

Use an older version of TensorFlow GPU (ie, < version 2.0). Then apply the fix mentioned in this PR: #24. That should be enough to get it working.

@neuronx1
Copy link

I have the same error but unfortunately I cant downgrade TensorFlow, because a lower version isn't supported by my GPU.
Does anybody now how to re-write this code?
I would very happy about any solutions.

@wangjinhahahahaha
Copy link

tf.data.Dataset(
input_length=text_length,
tensors=[text, mel, mag, fname],
batch_size=hp.B,#
bucket_boundaries=[i for i in range(minlen + 1, maxlen - 1, 20)],
num_threads=8,#
capacity=hp.B*4,
dynamic_pad=True)
TypeError: Can't instantiate abstract class DatasetV2 with abstract methods _inputs, element_spec
how to deal with it?

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

4 participants