Ich versuche, ein Beispielskript zu laufen, wo ichAttribut Fehler: Modul hat kein Attribut in tensorflow
import tensorflow as tf
def main():
if __name__ = '__main__':
tf.app.run(main = main)
verwenden, die einen Fehler wirft:
AttributeError: module 'tensorflow' has no attribute 'app'
aber wenn ich laufe es als:
from tensorflow.python.platform import app
es läuft gut .. die python-Version ich verwende ist 3.6.1 und tensorflow Version: 0.1.8
actuallsogar
print(tf.__version__)
zeigt ein Attribut Fehler ..
AttributeError: module 'tensorflow' has no attribute '__version__'
was die Ausgabe von Druck ist (dir (tf))? – Mitiku
Das ist das Outpt: ['__doc__', '__loader__', '__name__', '__package__', '__path__','__spec__ ',' core ',' python '] – thealchemist
Dies sind keine Attribute von Tensorflow. Möglicherweise haben Sie eine Datei namens tensorflow.py im Arbeitsverzeichnis. überprüfen Sie bitte, dass – Mitiku