ich brauche mal etwas Hilfe. Ich habe auf meinem Win 10 PC Visual Studio Code installiert. Dann habe ich die Pakete für Python und Tensorflow installiert.
Hier mein Quelltext, welchen ich testen möchte:
Code: Alles auswählen
import tensorflow as tf
from tensorflow import keras
model = keras.Sequential([keras.layers.Dense(units=1, input_shape=[1])])
model.compile(optimizer='sgd', loss='mean_squared_error')
xs = [1, 2, 3]
ys = [2, 4, 6]
model.fit(xs, ys, epochs=1000)
print(model.predict([7]))
Hallo.py", line 1, in <module>
import tensorflow as tf
auch der Begriff "tensorflow" wird nicht erkannt und im Code als Fehler angezeigt. Was kann ich da machen?