The problem
Operation error:
import tensorflow.contrib.layers as layers
ModuleNotFoundError: No module named 'tensorflow.contrib'
Copy the code
Question why
Versions above tensorFlow2 do not have contrib properties
The solution
Install the version of tensorflow1
PIP install tensorflow = = 1.15Copy the code