tensorflow warning

Wenn du dir nicht sicher bist, in welchem der anderen Foren du die Frage stellen sollst, dann bist du hier im Forum für allgemeine Fragen sicher richtig.
Antworten
toper
User
Beiträge: 73
Registriert: Freitag 13. April 2018, 14:37

Hallo zusammen,
ich habe tensorflow installiert und ein programm laufen lassen

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])) 
Das Programm funktioniert, allerdings werden am Anfang des Programms fehlermeldungen ausgegeben
Warning (from warnings module):
File "C:\Users\Tobias_Arbeit\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\framework\dtypes.py", line 516
_np_qint8 = np.dtype([("qint8", np.int8, 1)])
FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.

Warning (from warnings module):
File "C:\Users\Tobias_Arbeit\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\framework\dtypes.py", line 517
_np_quint8 = np.dtype([("quint8", np.uint8, 1)])
FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.

Warning (from warnings module):
File "C:\Users\Tobias_Arbeit\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\framework\dtypes.py", line 518
_np_qint16 = np.dtype([("qint16", np.int16, 1)])
FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.

Warning (from warnings module):
File "C:\Users\Tobias_Arbeit\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\framework\dtypes.py", line 519
_np_quint16 = np.dtype([("quint16", np.uint16, 1)])
FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.

Warning (from warnings module):
File "C:\Users\Tobias_Arbeit\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\framework\dtypes.py", line 520
_np_qint32 = np.dtype([("qint32", np.int32, 1)])
FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.

Warning (from warnings module):
File "C:\Users\Tobias_Arbeit\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\framework\dtypes.py", line 525
np_resource = np.dtype([("resource", np.ubyte, 1)])
FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.

Warning (from warnings module):
File "C:\Users\Tobias_Arbeit\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py", line 541
_np_qint8 = np.dtype([("qint8", np.int8, 1)])
FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.

Warning (from warnings module):
File "C:\Users\Tobias_Arbeit\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py", line 542
_np_quint8 = np.dtype([("quint8", np.uint8, 1)])
FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.

Warning (from warnings module):
File "C:\Users\Tobias_Arbeit\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py", line 543
_np_qint16 = np.dtype([("qint16", np.int16, 1)])
FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.

Warning (from warnings module):
File "C:\Users\Tobias_Arbeit\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py", line 544
_np_quint16 = np.dtype([("quint16", np.uint16, 1)])
FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.

Warning (from warnings module):
File "C:\Users\Tobias_Arbeit\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py", line 545
_np_qint32 = np.dtype([("qint32", np.int32, 1)])
FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.

Warning (from warnings module):
File "C:\Users\Tobias_Arbeit\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py", line 550
np_resource = np.dtype([("resource", np.ubyte, 1)])
FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
WARNING: Logging before flag parsing goes to stderr.
W0817 13:27:10.047008 4644 deprecation.py:506] From C:\Users\Tobias_Arbeit\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\ops\init_ops.py:1251: calling VarianceScaling.__init__ (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.
Instructions for updating:
Call initializer instance with the dtype argument instead of passing it to the constructor
Weiß jemand was diese Meldungen bedeuten?
Und ist es ein Problem(also schränkt es die Funktion von tensorflow irgendwie ein) oder kann man sie ignorieren?
Wenn ja, kann man sie irgendwie ausblenden?
Benutzeravatar
__blackjack__
User
Beiträge: 13100
Registriert: Samstag 2. Juni 2018, 10:21
Wohnort: 127.0.0.1
Kontaktdaten:

@toper: Zum Unterdrücken von Warnungen nach verschiedenen Kriterien steht etwas in der Dokumentation zum `warnings`-Modul.
„All religions are the same: religion is basically guilt, with different holidays.” — Cathy Ladman
toper
User
Beiträge: 73
Registriert: Freitag 13. April 2018, 14:37

@_blackjack_: Ich habe bereits nach solchen befehlen gesucht aber nichts gefunden.
Mein eigendliches problem liegt auch darin dass ich nicht weiß ob ich durch diese Fehlermeldungen irgendwelche funktionen nicht nutzen kann!
__deets__
User
Beiträge: 14536
Registriert: Mittwoch 14. Oktober 2015, 14:29

Nein, nur wird dein Code in zukünftigen Versionen nicht mehr tun. Und was man gegen die Warnung unternehmen kann (statt sie zu ignorieren/unterdrücken) steht in der Warnung selbst.
Benutzeravatar
__blackjack__
User
Beiträge: 13100
Registriert: Samstag 2. Juni 2018, 10:21
Wohnort: 127.0.0.1
Kontaktdaten:

@toper: Wie gesucht und nicht gefunden? Nicht irgendwo im Netz mit einer Suchmaschine suchen, sondern einfach die Dokumentation zum `warnings`-Modul aus der Python-Standardbibliothek lesen.
„All religions are the same: religion is basically guilt, with different holidays.” — Cathy Ladman
Antworten