Skip to content

Run code TF-GPU erroring #43

@Eslam2011

Description

@Eslam2011

I run python code using TF-GPU on this image tensorflow/tensorflow:latest-gpu, and they alot of errors in code such as:

x_idxs = tf.placeholder(tf.int64, shape=[None,2])
AttributeError: module 'tensorflow' has no attribute 'placeholder'

I solved it by using
import tensorflow.compat.v1 as tf
tf.disable_v2_behavior()

### But why this error, I think the code must run without any error?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions