Python - Output trop verbose

Python - Output trop verbose - Python - Programmation

Marsh Posté le 29-05-2019 à 19:15:42    

Bonjour, quand le lance un script Python et je recupere l'output dans un fichier, le fichier contient les données, par contre j'ai du garbage sur la console.
 
Quelqu'un saurait comment se debarrasser de ce logging inutile ?
 

# python3.5 /root/tensorflow_work/label_image.py foobar.jpg > foobar ;
2019-05-29 20:03:03.059523: W tensorflow/core/framework/op_def_util.cc:355] Op BatchNormWithGlobalNormalization is deprecated. It will cease to work in GraphDef version 9. Use tf.nn.batch_normalization().
2019-05-29 20:03:03.378680: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
2019-05-29 20:03:03.451922: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2111995000 Hz
2019-05-29 20:03:03.452021: I tensorflow/compiler/xla/service/service.cc:150] XLA service 0x6ba17e0 executing computations on platform Host. Devices:
2019-05-29 20:03:03.452034: I tensorflow/compiler/xla/service/service.cc:158]   StreamExecutor device (0): <undefined>, <undefined>
2019-05-29 20:03:04.141918: W tensorflow/core/framework/allocator.cc:124] Allocation of 25245000 exceeds 10% of system memory.
2019-05-29 20:03:04.159574: W tensorflow/core/framework/allocator.cc:124] Allocation of 100980000 exceeds 10% of system memory.


 

# head foobar
foo (score = 0.64049)
bar (score = 0.35951)


 
Merci.


---------------
"Première fois de ma vie que je te vois mais tu m'as l'air d'un sacré tocard !"
Reply

Marsh Posté le 29-05-2019 à 19:15:42   

Reply

Marsh Posté le 29-05-2019 à 20:02:44    

python3.5 /root/tensorflow_work/label_image.py foobar.jpg > foobar 2>/dev/null

Reply

Marsh Posté le 29-05-2019 à 20:20:47    

rat de combat a écrit :

python3.5 /root/tensorflow_work/label_image.py foobar.jpg > foobar 2>/dev/null


 
Merci beaucoup, ca marche impec   :jap:


---------------
"Première fois de ma vie que je te vois mais tu m'as l'air d'un sacré tocard !"
Reply

Sujets relatifs:

Leave a Replay

Make sure you enter the(*)required information where indicate.HTML code is not allowed