IT/AI
tf.keras를 사용하기 위해 알아야 할 오픈소스 2가지
심장과영혼
2022. 12. 3. 22:43
728x90
반응형
오늘은 tf.keras를 사용하기 위해 알아야 할 오픈소스 2가지에 대해서 알아보겠습니다.
텐서플로에 접근하기 위해서 알아야 할 내용중의 하나입니다.
NumPy 및 pandas
tf.keras를 사용하려면 최소한 다음 오픈소스 Python 라이브러리 2개에 대한 이해가 필요합니다.
만약 NumPy 또는 Pandas에 익숙하지 않은 경우 다음 두 가지 Colab 연습으로 시작해 볼 수 있습니다.
- NumPy Ultraquick 튜토리얼 Colab 실습에서 이 과정에 필요한 NumPy 정보를 모두 확인할 수 있습니다.
- pandas Ultra 튜토리얼 Colab 실습에서 이 과정에 필요한 Pandas 정보를 모두 확인할 수 있습니다.
여러분의 학문의 진보를 응원합니다.
NumPy의 예시입니다.)
"""
To try the examples in the browser:
1. Type code in the input cell and press
Shift + Enter to execute
2. Or copy paste the code, and click on
the "Run" button in the toolbar
"""
# The standard way to import NumPy:
import numpy as np
# Create a 2-D array, set every second element in
# some rows and find max per row:
x = np.arange(15, dtype=np.int64).reshape(3, 5)
x[1:, ::2] = -99
x
# array([[ 0, 1, 2, 3, 4],
# [-99, 6, -99, 8, -99],
# [-99, 11, -99, 13, -99]])
x.max(axis=1)
# array([ 4, 8, 13])
# Generate normally distributed random numbers:
rng = np.random.default_rng()
samples = rng.normal(size=2500)
samples
728x90
반응형