If you have this error after an upgrade to TensorFlow 2.0, you can still use 1.X API by replacing:

```
import tensorflow as tf
```

by

```
import tensorflow.compat.v1 as tf
tf.disable_v2_behavior()
```

### Related Contents:

- What are logits? What is the difference between softmax and softmax_cross_entropy_with_logits?
- Keras Dense layer’s input is not flattened
- Make a custom loss function in keras
- Keras not training on entire dataset
- Deep-Learning Nan loss reasons
- How to apply gradient clipping in TensorFlow?
- Can Keras with Tensorflow backend be forced to use CPU or GPU at will?
- Unbalanced data and weighted cross entropy
- Proper way to feed time-series data to stateful LSTM?
- Save and load model optimizer state
- error: (-2:Unspecified error) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Cocoa support
- ValueError at /image/ Tensor Tensor(“activation_5/Softmax:0”, shape=(?, 4), dtype=float32) is not an element of this graph
- Keras custom loss function: Accessing current input pattern
- How to get other metrics in Tensorflow 2.0 (not only accuracy)?
- How can I use a pre-trained neural network with grayscale images?
- How do I set TensorFlow RNN state when state_is_tuple=True?
- How to know if underfitting or overfitting is occuring?
- Reset weights in Keras layer
- How to extract the decision rules from scikit-learn decision-tree?
- How to export Keras .h5 to tensorflow .pb?
- Using a pre-trained word embedding (word2vec or Glove) in TensorFlow
- Could not load dynamic library ‘cudart64_101.dll’ on tensorflow CPU-only installation
- Tensorflow – ValueError: Failed to convert a NumPy array to a Tensor (Unsupported object type float)
- Is it possible to specify your own distance function using scikit-learn K-Means Clustering?
- Keras + Tensorflow and Multiprocessing in Python
- Fix not load dynamic library for Tensorflow GPU
- Convert array of indices to one-hot encoded array in NumPy
- How do I initialize weights in PyTorch?
- Why is Random Forest with a single tree much better than a Decision Tree classifier?
- In TensorFlow, what is the difference between Session.run() and Tensor.eval()?
- Does Any one got “AttributeError: ‘str’ object has no attribute ‘decode’ ” , while Loading a Keras Saved Model
- Error in Python script “Expected 2D array, got 1D array instead:”?
- Feature/Variable importance after a PCA analysis
- Keras replacing input layer
- Is there a simpler way to handle batch inputs from tfrecords?
- What does model.eval() do in pytorch?
- What is the difference between tf.keras and tf.python.keras?
- Processing time gets longer and longer after each iteration (TensorFlow)
- Illegal instruction (core dumped) after running import tensorflow
- Negative dimension size caused by subtracting 3 from 1 for ‘conv2d_2/convolution’
- ‘Library not loaded: @rpath/libcudart.7.5.dylib’ TensorFlow Error on Mac
- RuntimeError: Input type (torch.FloatTensor) and weight type (torch.cuda.FloatTensor) should be the same
- What is exactly sklearn.pipeline.Pipeline?
- What is the role of TimeDistributed layer in Keras?
- What’s the difference between torch.stack() and torch.cat() functions?
- Tensorflow – matmul of input matrix with batch data
- Replacing placeholder for tensorflow v2
- Can anyone explain me StandardScaler?
- tf.nn.conv2d vs tf.layers.conv2d
- How do I get the weights of a layer in Keras?