AttributeError: module 'tensorflow' has no attribute 'placeholder'

**

Problem Description

This error occurs when using Colab, as shown below:
**
AttributeError: Module1 'tensorflow' attribute has NO 'placeholder'

If you use the convert code, this error may also occur following

TypeError: call() takes from 2 to 3 positional arguments but 4 were give

problem causes:

It is actually very simple, Colab into version 2.0 of the tensorflow

problem solved:

In fact, more simply, as long as at the beginning of the code to add the following sentence is like, but take note plus an interpreter after the restart it was useful!
% tensorflow_version 1.x

Released five original articles · won praise 0 · Views 266

Guess you like

Origin blog.csdn.net/Nick_Dizzy/article/details/105349692