Tensorflow: TF 1.x: "μ‚¬μš©λ˜μ§€ μ•ŠλŠ”" κ²½κ³  λ©”μ‹œμ§€ 제거

에 λ§Œλ“  2019λ…„ 03μ›” 22일  Β·  29μ½”λ©˜νŠΈ  Β·  좜처: tensorflow/tensorflow

tf.layers.dense와 같은 κΈ°λŠ₯적 APIκ°€ TF 2.0μ—μ„œ μ‚¬λΌμ§ˆ κ²ƒμ΄λΌλŠ” 것을 μ•Œκ³  μžˆμŠ΅λ‹ˆλ‹€. κ·ΈλŸ¬λ‚˜ λŒ€μ•ˆμΈ tf.keras.layersλŠ” TF 1.x의 λ‹€λ₯Έ ꡬ성 μš”μ†Œμ™€ ν˜Έν™˜λ˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€. 예λ₯Ό λ“€μ–΄ κ°€λ³€ λ²”μœ„λ₯Ό μ§€μ›ν•˜μ§€λ„ μ•ŠμŠ΅λ‹ˆλ‹€(#27016). κ·Έλž˜μ„œ μ €λŠ” TF 1.xμ—μ„œ 더 이상 μ‚¬μš©λ˜μ§€ μ•ŠλŠ” APIλ₯Ό κ³ μˆ˜ν•  κ²ƒμž…λ‹ˆλ‹€.
xxx (from tensorflow.python.layers.core) is deprecated and will be removed in a future version. Use keras.layers.xxx instead. 와 같은 μ—­κ²¨μš΄ "μ‚¬μš©λ˜μ§€ μ•ŠλŠ”" κ²½κ³  λ©”μ‹œμ§€λ₯Ό μ œκ±°ν•˜μ‹œκ² μŠ΅λ‹ˆκΉŒ?

κ°€μž₯ μœ μš©ν•œ λŒ“κΈ€

1.14.0 μ—μ„œλ§Œ μž‘λ™ν•©λ‹ˆλ‹€.

import tensorflow as tf
tf.compat.v1.logging.set_verbosity(tf.compat.v1.logging.ERROR)

λͺ¨λ“  29 λŒ“κΈ€

당신은 이것을 μ‚¬μš©ν•  수 μžˆμŠ΅λ‹ˆλ‹€
μˆ˜μž… OS
ν…μ„œν”Œλ‘œλ₯Ό tf둜 κ°€μ Έμ˜€κΈ°
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'

μžμ„Ένžˆ:-
0 = λͺ¨λ“  λ©”μ‹œμ§€κ°€ 기둝됨(κΈ°λ³Έ λ™μž‘)
1 = INFO λ©”μ‹œμ§€κ°€ μΈμ‡„λ˜μ§€ μ•ŠμŒ
2 = INFO 및 WARNING λ©”μ‹œμ§€κ°€ μΈμ‡„λ˜μ§€ μ•ŠμŒ
3 = INFO, WARNING 및 ERROR λ©”μ‹œμ§€κ°€ μΈμ‡„λ˜μ§€ μ•ŠμŒ

이것은 λ‚΄κ°€ λͺ‡ λ…„ λ™μ•ˆ μ‚¬μš©ν•˜κ³ μžˆλŠ” κ²ƒμž…λ‹ˆλ‹€
μ‚¬μš© 쀑단 κ²½κ³ λ₯Ό 쀑지할 수 μ—†μŠ΅λ‹ˆλ‹€.

그건 κ·Έλ ‡κ³ , 이전 ꡬ성 μš”μ†Œλ₯Ό 더 이상 μ‚¬μš©ν•˜μ§€ μ•ŠκΈ° 전에 ν˜„μž¬ κΈ°λŠ₯을 μ™„λ£Œν•˜μ‹œκ² μŠ΅λ‹ˆκΉŒ? #27042λ₯Ό μ°Έμ‘°ν•˜μ‹­μ‹œμ˜€. TFλŠ” 널리 μ‚¬μš©λ˜λŠ” κΈ°λŠ₯을 λΉ„μΆ”μ²œν•˜λŠ” λ°λŠ” 맀우 λ›°μ–΄λ‚˜μ§€λ§Œ 약점을 κ°œμ„ ν•˜λŠ” λ°λŠ” μ„œνˆ΄λ‹€.

μ‹€μ œ λ²„μ „μ˜ TensorFlowλ₯Ό μ‚¬μš©ν•˜λ €λŠ” μ‚¬λžŒλ“€μ—κ²Œ μ•žμœΌλ‘œ 일어날 일을 μ•Œλ¦¬κ³  적응할 μ‹œκ°„μ„ μ£ΌκΈ° μœ„ν•΄ 지원 쀑단 λ©”μ‹œμ§€κ°€ ν•„μš”ν•©λ‹ˆλ‹€.

λ”°λΌμ„œ μ΄λŸ¬ν•œ λ©”μ‹œμ§€λŠ” μ‚­μ œν•  수 μ—†μŠ΅λ‹ˆλ‹€. 이 λΉ„κ³΅κ°œ APIλ₯Ό μ‚¬μš©ν•˜μ—¬ 직접 λΉ„ν™œμ„±ν™”ν•  수 μžˆμŠ΅λ‹ˆλ‹€.

import tensorflow.python.util.deprecation as deprecation
deprecation._PRINT_DEPRECATION_WARNINGS = False

감사 ν•΄μš”
#27045, μ œμ•ˆ 사항이 μžˆμŠ΅λ‹ˆκΉŒ?

이 μ½”λ“œλŠ” λ‚˜μ—κ²Œ 였λ₯˜λ₯Ό μ£Όμ—ˆλ‹€:

import tensorflow.python.util.deprecation as deprecation
deprecation._PRINT_DEPRECATION_WARNINGS = False
AttributeError: module 'tensorflow' has no attribute 'python'

κ·ΈλŸ¬λ‚˜ κ°€μ Έμ˜€κΈ° 쀄을 λ³€κ²½ν•˜λ©΄ μž‘λ™ν•˜κ²Œ λ©λ‹ˆλ‹€(μ›ν•˜λŠ” λŒ€λ‘œ μ‚¬μš© 쀑단 κ²½κ³ κ°€ ν‘œμ‹œλ˜μ§€ μ•ŠμŒ).

from tensorflow.python.util import deprecation
deprecation._PRINT_DEPRECATION_WARNINGS = False

감사 ν•΄μš”

@skylogic004 이것은 졜근 λ§ˆμŠ€ν„°μ˜ μ†ŒμŠ€μ—μ„œ 졜근 μ•Όκ°„/λΉŒλ“œμ—μ„œ κ°€μ Έμ˜¨ κ²ƒμž…λ‹ˆκΉŒ?

@mihaimaruseac 였, μ €λŠ” μ•„λ‚˜μ½˜λ‹€μ˜ tf 1.13을 μ‚¬μš©ν•˜κ³  μžˆμŠ΅λ‹ˆλ‹€.

$ python
Python 3.6.6 | packaged by conda-forge | (default, Jul 26 2018, 11:48:23) [MSC v.1900 64 bit (AMD64)] on win32  
Type "help", "copyright", "credits" or "license" for more information.                                          
>>> import tensorflow as tf                                                                                     
>>> tf.__version__                                                                                              
'1.13.1'                                                                                                        

$ conda list | grep tensor
tensorboard               1.13.1           py36h33f27b4_0
tensorflow                1.13.1          gpu_py36h1635174_0
tensorflow-base           1.13.1          gpu_py36h0fff12a_0
tensorflow-estimator      1.13.0                     py_0
tensorflow-gpu            1.13.1               h0d30ee6_0

μ•„λ‚˜μ½˜λ‹€ νŒ¨ν‚€μ§€ 링크: https://anaconda.org/anaconda/tensorflow-gpu

κ·Έλ ‡λ‹€λ©΄ κ±±μ •ν•  ν•„μš”κ°€ μ—†μŠ΅λ‹ˆλ‹€(전체 μ»¨ν…μŠ€νŠΈ: μ§€λ‚œ 주에 λ‚΄κ°€ λ§Œλ“  일뢀 λ³€κ²½μœΌλ‘œ 인해 κ°€μ Έμ˜€κΈ°μ— μ•½κ°„μ˜ μ‹€νŒ¨κ°€ μžˆμ—ˆμ§€λ§Œ μ΄λŠ” λ§ˆμŠ€ν„° μ½”λ“œμ—λ§Œ μžˆλŠ” κ²ƒμ΄λ―€λ‘œ 그렇지 μ•Šμ€ 것 κ°™μŠ΅λ‹ˆλ‹€)

μ‚¬μš© 쀑단 κ²½κ³ λŠ” κ°œλ°œμžμ—κ²Œ μ€‘μš”ν•©λ‹ˆλ‹€. μ‚¬μš©μžμ—κ²Œ 그닀지 μœ μš©ν•˜μ§€ μ•Šμ„ 수 μžˆμŠ΅λ‹ˆλ‹€. λ”°λΌμ„œ μŠ€μœ„μΉ˜λ₯Ό λ„λŠ” 것이 λ°”λžŒμ§ν•œ 상황이 μžˆμŠ΅λ‹ˆλ‹€.

Pythonμ—λŠ” sys.warnoptions κ°€ μžˆμŠ΅λ‹ˆλ‹€. 예λ₯Ό λ“€μ–΄ PYTHONWARNINGS λ₯Ό 톡해 μ„€μ •ν•  수 μžˆμŠ΅λ‹ˆλ‹€. 예:
PYTHONWARNINGS=ignore .

TensorFlowμ—λŠ” μ•žμ—μ„œ μ§€μ ν•œ λŒ€λ‘œ 자체 TF_CPP_MIN_LOG_LEVEL μ˜΅μ…˜μ΄ μžˆμŠ΅λ‹ˆλ‹€.

그리고 TensorFlow Python λ‘œκΉ… API도 μžˆμŠ΅λ‹ˆλ‹€(이전에 νš¨κ³Όκ°€ μžˆλ‹€κ³  λ―Ώμ—ˆμŠ΅λ‹ˆλ‹€).

import tensorflow as tf

tf.compat.v1.logging.set_verbosity(tf.compat.v1.logging.ERROR)

μœ„μ˜ μ–΄λ–€ μ˜΅μ…˜λ„ κ²½κ³  λ©”μ‹œμ§€κ°€ μΈμ‡„λ˜λŠ” 것을 막지 λͺ»ν•œλ‹€λŠ” 것은 버그인 것 κ°™μŠ΅λ‹ˆλ‹€.

_PRINT_DEPRECATION_WARNINGS ν”Œλž˜κ·ΈλŠ” 내뢀에 μžˆλŠ” κ²ƒμœΌλ‘œ 보이며 μ–Έμ œλ“ μ§€ 제거될 수 μžˆμŠ΅λ‹ˆλ‹€.

νŽΈμ§‘: μ£„μ†‘ν•©λ‹ˆλ‹€. tensorflow 경고에 λŒ€ν•΄ numpy FuturreWarning 을 ν˜Όλ™ν–ˆμŠ΅λ‹ˆλ‹€. λ‘œκΉ… μˆ˜μ€€μ„ μ„€μ •ν•˜λŠ” λ§ˆμ§€λ§‰ μ˜΅μ…˜μ€ 일반적으둜 μ—¬μ „νžˆ μž‘λ™ν•©λ‹ˆλ‹€.

1.14.0 μ—μ„œλ§Œ μž‘λ™ν•©λ‹ˆλ‹€.

import tensorflow as tf
tf.compat.v1.logging.set_verbosity(tf.compat.v1.logging.ERROR)

r1.14 μ΄μƒμ˜ 경우 λ‹€μŒμ„ μ‹œλ„ν•˜μ‹­μ‹œμ˜€.

try:
    from tensorflow.python.util import module_wrapper as deprecation
except ImportError:
    from tensorflow.python.util import deprecation_wrapper as deprecation
deprecation._PER_MODULE_WARNING_LIMIT = 0

μ–΄μ¨Œλ“  내뢀적이고 변경될 수 μžˆμŠ΅λ‹ˆλ‹€.

λ˜λŠ” μ‚¬μš© 쀑단 κ²½κ³ κ°€ 제거된 TF2.0으둜 μ „ν™˜ν•©λ‹ˆλ‹€(ν•„μš”ν•˜μ§€ μ•Šμ€ 경우).

IDEλ₯Ό 잘 μ„ νƒν•˜μ§€ μ•ŠλŠ” ν•œ :p
λ‚˜λ₯Ό λ‘€λ°±ν•˜κ²Œ λ§Œλ“  μœ μΌν•œ 것은 μžλ™ μ™„μ„± λ¬Έμ œμ˜€μœΌλ―€λ‘œ μ΄λŸ¬ν•œ μ–΅μ œ μš”μ²­μ€ μœ νš¨ν•©λ‹ˆλ‹€.

μžλ™ 완성은 λŒ€λΆ€λΆ„ ν•΄κ²°λ˜μ—ˆμŠ΅λ‹ˆλ‹€

μ œμ•ˆλœ λͺ¨λ“  것을 μ‹œλ„ν–ˆμŠ΅λ‹ˆλ‹€.

os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'
import tensorflow as tf
tf.compat.v1.logging.set_verbosity(tf.compat.v1.logging.ERROR)
from tensorflow.python.util import deprecation
deprecation._PRINT_DEPRECATION_WARNINGS = False
try:
    from tensorflow.python.util import module_wrapper as deprecation
except ImportError:
    from tensorflow.python.util import deprecation_wrapper as deprecation
deprecation._PER_MODULE_WARNING_LIMIT = 0

κ·ΈλŸΌμ—λ„ λΆˆκ΅¬ν•˜κ³  κ²½κ³  더미가 μžˆμŠ΅λ‹ˆλ‹€.

/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/dtypes.py:516: 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'.
  _np_qint8 = np.dtype([("qint8", np.int8, 1)])
/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/dtypes.py:517: 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'.
  _np_quint8 = np.dtype([("quint8", np.uint8, 1)])
/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/dtypes.py:518: 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'.
  _np_qint16 = np.dtype([("qint16", np.int16, 1)])
/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/dtypes.py:519: 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'.
  _np_quint16 = np.dtype([("quint16", np.uint16, 1)])
/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/dtypes.py:520: 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'.
  _np_qint32 = np.dtype([("qint32", np.int32, 1)])
/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/dtypes.py:525: 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'.
  np_resource = np.dtype([("resource", np.ubyte, 1)])
/usr/local/lib/python3.6/dist-packages/tensorboard/compat/tensorflow_stub/dtypes.py:541: 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'.
  _np_qint8 = np.dtype([("qint8", np.int8, 1)])
/usr/local/lib/python3.6/dist-packages/tensorboard/compat/tensorflow_stub/dtypes.py:542: 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'.
  _np_quint8 = np.dtype([("quint8", np.uint8, 1)])
/usr/local/lib/python3.6/dist-packages/tensorboard/compat/tensorflow_stub/dtypes.py:543: 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'.
  _np_qint16 = np.dtype([("qint16", np.int16, 1)])
/usr/local/lib/python3.6/dist-packages/tensorboard/compat/tensorflow_stub/dtypes.py:544: 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'.
  _np_quint16 = np.dtype([("quint16", np.uint16, 1)])
/usr/local/lib/python3.6/dist-packages/tensorboard/compat/tensorflow_stub/dtypes.py:545: 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'.
  _np_qint32 = np.dtype([("qint32", np.int32, 1)])
/usr/local/lib/python3.6/dist-packages/tensorboard/compat/tensorflow_stub/dtypes.py:550: 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'.
  np_resource = np.dtype([("resource", np.ubyte, 1)])
TF version 1.14.0

μš°λΆ„νˆ¬ 16.04
파이썬 3.6.8

@pyotr777 파이썬 λ‚΄μž₯ 경고의 경우 λ‹€μŒμ„ μ‚¬μš©ν•˜μ—¬ μ–΅μ œν•΄μ•Ό ν•©λ‹ˆλ‹€.

warnings.filterwarnings('ignore', category=DeprecationWarning)
warnings.filterwarnings('ignore', category=FutureWarning)

@pyotr777 그것듀은 numpyμ—μ„œ μ™”μŠ΅λ‹ˆλ‹€. μ‚¬μš© 쀑인 TF 버전과 μ•½κ°„ ν˜Έν™˜λ˜μ§€ μ•ŠλŠ” numpy 버전을 μ‚¬μš©ν•˜κ³  μžˆμŠ΅λ‹ˆλ‹€.

더 λ§Žμ€ downvotesλ₯Ό 얻을 μœ„ν—˜μ΄ μžˆμœΌλ―€λ‘œ 2.0으둜 μ „ν™˜ν•˜μ‹­μ‹œμ˜€.

미래 경고

import warnings
warnings.filterwarnings('ignore', category=DeprecationWarning)
warnings.filterwarnings('ignore', category=FutureWarning)

μ–΅λˆ„λ₯΄μ§€ μ•Šμ•˜λ‹€

/usr/local/lib/python3.7/site-packages/tensorflow/python/framework/dtypes.py:516: 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'.
  _np_qint8 = np.dtype([("qint8", np.int8, 1)])

λ‚˜λ₯Ό μœ„ν•΄ 이것은 t2.0 경고에 νš¨κ³Όμ μ΄μ—ˆμŠ΅λ‹ˆλ‹€.

import tensorflow as tf
tf.get_logger().warning('test')
# WARNING:tensorflow:test
tf.get_logger().setLevel('ERROR')
tf.get_logger().warning('test')

FYI TF_CPP_MIN_LOG_LEVEL이 더 이상 μž‘λ™ν•˜μ§€ μ•Šμ•„ TensorFlow의 둜그인이 λ³€κ²½λ˜μ—ˆμŠ΅λ‹ˆλ‹€.

κ·ΈλŸΌμ—λ„ λΆˆκ΅¬ν•˜κ³  κ²½κ³  더미가 μžˆμŠ΅λ‹ˆλ‹€.

/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/dtypes.py:516: FutureWarning: (type, 1) λ˜λŠ” '1type'을 λ™μ˜μ–΄λ‘œ μ „λ‹¬ν•˜λŠ” 것은 더 이상 μ‚¬μš©λ˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€. numpy의 ν–₯ν›„ λ²„μ „μ—μ„œλŠ” (type, (1,)) / '(1,)type'으둜 이해될 κ²ƒμž…λ‹ˆλ‹€.
_np_qint8 = np.dtype([("qint8", np.int8, 1)])
/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/dtypes.py:517: FutureWarning: (type, 1) λ˜λŠ” '1type'을 λ™μ˜μ–΄λ‘œ μ „λ‹¬ν•˜λŠ” 것은 더 이상 μ‚¬μš©λ˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€. numpy의 ν–₯ν›„ λ²„μ „μ—μ„œλŠ” (type, (1,)) / '(1,)type'으둜 이해될 κ²ƒμž…λ‹ˆλ‹€.
_np_quint8 = np.dtype([("quint8", np.uint8, 1)])

1을 0으둜 λ³€κ²½ν•˜λ €λ©΄ ν•œ λ²ˆμ— ν•˜λ‚˜μ”© μ‹œλ„ν•˜μ‹­μ‹œμ˜€. 예: _np_qint8 = np.dtype([("qint8", np.int8, 1)]) to _np_qint8 = np.dtype([("qint8", np.int8 , 0)]) μ €μ—κ²Œ νš¨κ³Όμ μž…λ‹ˆλ‹€.

solve warnings

μ‚¬μš© 쀑인 TF 버전과 μ•½κ°„ ν˜Έν™˜λ˜μ§€ μ•ŠλŠ” numpy 버전을 μ‚¬μš©ν•˜κ³  μžˆμŠ΅λ‹ˆλ‹€.

λ‚˜λ₯Ό μœ„ν•΄ νΌνŒ… μž‘μ—…

import warnings
warnings.filterwarnings('ignore',category=FutureWarning)

~ 전에

import tensorflow as tf

및 기타 λͺ¨λ“  μˆ˜μž…ν’ˆ.

TF 1.14.0κ³Ό numpy 1.18.1이 μžˆμŠ΅λ‹ˆλ‹€.

tensorflowλ₯Ό κ°€μ Έμ˜€κΈ° 전에 λ‹€μŒμ„ κ΅¬ν˜„ν•΄μ•Ό ν•©λ‹ˆλ‹€.
μˆ˜μž… κ²½κ³ 
warnings.filterwarnings('λ¬΄μ‹œ',category=FutureWarning)
warnings.filterwarnings('λ¬΄μ‹œ', category=DeprecationWarning)
tensorflow==1.12.0, numpy==1.18.1, python 3.6μ—μ„œ μž‘λ™ν•©λ‹ˆλ‹€.

λ‚˜λŠ” 이것을 μ‹œλ„ν–ˆλ‹€ :

import warnings
warnings.filterwarnings('ignore',category=FutureWarning)
warnings.filterwarnings('ignore', category=DeprecationWarning)

그리고 그것은 λ‚΄κ°€-λŒ€ν™” ν˜•μ΄ μ•„λ‹Œ 파이썬 μ‹€ν–‰ν–ˆμ„ λ•Œ λ‚˜λ₯Ό μœ„ν•΄ μž‘λ™ν•˜μ§€ μ•Šμ•˜λ‹€ tensorflow==1.14.0 , numpy==1.18.1 , python==3.6.10 , κ·ΈλŸ¬λ‚˜ λŒ€ν™” ν˜• μ„Έμ…˜μ—μ„œ μž‘μ—…μ„ν–ˆλ‹€.

λŒ€ν™”μ‹ 및 λΉ„λŒ€ν™”μ‹μœΌλ‘œ νŒŒμ΄μ¬μ„ μ‹€ν–‰ν•  λ•Œ λ‹€μŒμ΄ μž‘λ™ν•œλ‹€λŠ” 것을 λ°œκ²¬ν–ˆμŠ΅λ‹ˆλ‹€. tensorflow 2.Xλ₯Ό μ‚¬μš©ν•  λ•Œ λ‹€μŒμ„ μ‚¬μš©ν•  수 μžˆμŠ΅λ‹ˆλ‹€.

import tensorflow as tf
tf.logging.set_verbosity(tf.logging.ERROR)

그리고 tensorflow 1.Xλ₯Ό μ‚¬μš©ν•  λ•Œ(1.14μ—μ„œ μž‘μ—…):

import tensorflow as tf
tf.compat.v1.logging.set_verbosity(tf.compat.v1.logging.ERROR)

λ‚˜λŠ” tf 1.13.1을 μ‚¬μš©ν•˜κ³  μžˆλ‹€
이것은 μž‘λ™ν•©λ‹ˆλ‹€:

import tensorflow as tf
tf.logging.set_verbosity(tf.logging.ERROR)

.compat.v1 λŠ” ν•„μš”ν•˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€.

λ‚˜λŠ” λͺ¨λ“  방법을 μ‹œλ„ν–ˆμ§€λ§Œ κ·Έλ“€ 쀑 λˆ„κ΅¬λ„ jupyter notebookμ—μ„œ μž‘λ™ν•˜μ§€ μ•Šμ•˜μŠ΅λ‹ˆλ‹€ ...

warnings.filterwarnings('ignore',category=FutureWarning)
이것은 tensorflowλ₯Ό κ°€μ Έμ˜¬ λ•Œ κ²½κ³ λ₯Ό λ¬΄μ‹œν•  수 μžˆμ§€λ§Œ λͺ¨λΈμ„ λ‘œλ“œν•˜λ©΄ μ—¬μ „νžˆ λ§Žμ€ WARN이 μ‘΄μž¬ν•©λ‹ˆλ‹€...

이 νŽ˜μ΄μ§€κ°€ 도움이 λ˜μ—ˆλ‚˜μš”?
0 / 5 - 0 λ“±κΈ‰