19. A Note on Python/Numpy Vectors
2023. 9. 8. 23:15ㆍGoogle ML Bootcamp/1. Neural Networks and Deep Learning
import numpy as np
a = np.random.randn(5)
a.shape
- (5,) : 1순위 배열이라고 부름.
- 이는 행 벡터나 열 벡터로 일관되게 동작하지 않음. 열벡터도 행벡터도 아님.
중요한것은 1순위 배열을 사용하지 않는 것.
a = np.random.randn(5,1) or a = np.random.randn(1,5)로 선언하여 사용.
a.shape
- (5,1) or (1,5)
행렬 차원을 구체화할 것.
'Google ML Bootcamp > 1. Neural Networks and Deep Learning' 카테고리의 다른 글
21. Explanation of Logistic Regression Cost Function(Optional) (0) | 2023.09.08 |
---|---|
20. Quick tour of Jupyter/iPython Notebooks (0) | 2023.09.08 |
18. Broadcasting in Python (0) | 2023.09.08 |
17. Vectorizing Logistic Regression's Gradient Output (0) | 2023.09.08 |
16. Vectorizing Logistic Regression (0) | 2023.09.08 |