Skip to content

Tensoflow2 compactable #24

@Karobben

Description

@Karobben

Since pip can't install tensoflow==1.7.0 now, we can only install tensoflow>=2.0
You may get the error:

ERROR: Could not find a version that satisfies the requirement tensorflow==1.70 (from versions: 2.2.0rc1,

As a result, you may come to some compatibility problems.
For example:

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

For solving the problems like this, you should target to the script which causes the problem and change the import tensorflow as tf to import tensorflow.compat.v1 as tf. Cite:dariemihai95

This works fine for me.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions