It is said that code completion did not work with tensorflow2.0 + VScode and it was difficult to solve it. It was reported in here, and there was a solution, so I tried it and it worked.
Development environment windows10 VScode==1.40.0 tensorflow==2.0.0
from .python.keras.api._v2 import keras
from tensorflow_estimator.python.estimator.api._v2 import estimator
Only this. However, I have not confirmed it because there was a note that there was no problem even if there was no addition of the import statement of 2, but it may be possible to just rename.
Also, there was a way to keep the library itself unchanged, so I will introduce it.
"python.autoComplete.extraPaths": [
"/path/to/dir"
],
I thought it was best to avoid messing around with the library itself, so I tried this method at first, but it didn't work in my environment, so I had no choice but to rename it.
Recommended Posts