Search code examples
pythontensorflowmachine-learningvisual-studio-codepylint

how to fix that tensorflow.tools.api.generator.api.contrib' has no 'layers' member?


I have tried to run code shared on GitHub with my VScode via pylint.

But I'm getting this error message:

E1101:Module 'tensorflow.tools.api.generator.api.contrib' has no 'layers' member

What's the problem here? How can I solve it?

Here is the code:
https://github.com/cj0012/AI-Practice-Tensorflow-Notes/blob/master/opt/opt4_8_forward.py


Solution

  • Pylint is wrong, the code runs fine. The problem is most likely related to the way TensorFlow generates its API.