본문 바로가기

전체 글54

Introduction to Deep Learning with PyTorch - [Chapter 3] Neural Network Architecture and Hyperparameters - 그래서 Gradient Vanishing 문제가 발생함 원래 X값이 너무 높거나 너무 낮은 경우, 기울기가 0에 가까워 가중치 업데이트가 반영이 안 됨 = 훈련이 안 됨 기타등등 Activation Funcitons https://wikidocs.net/163752 C_4.01 Activation Functions : Leaky ReLU, Mish ## Activation Functions : Sigmoid, tanh, ReLU, Leaky ReLU, PReLU, ELU, Threshold ReLU and Softmax b… wikidocs.net Uniform distribution으로 weight 초기화 → we.. 2024. 4. 14.
Time-LLM: Time Series Forecasting by Reprogramming Large Language Models(240414, 공부기록 2일차) 금융시계열쪽으로 공부해 보고 싶다는 막연한 생각이 있어 추천 받은 논문이다. LLM으로 time-series forecasting을 하는 방법인데, reprogramming방식을 적용했다. original paper https://arxiv.org/abs/2310.01728 Time-LLM: Time Series Forecasting by Reprogramming Large Language Models Time series forecasting holds significant importance in many real-world dynamic systems and has been extensively studied. Unlike natural language process (NLP) and compute.. 2024. 4. 13.
Introduction to Deep Learning with PyTorch - [Chapter 2] 이어서 작성합니다 Training Our First Neural Network with PyTorch Loss Function import torch import torch.nn.Functional as F y = 1 num_classes = 3 #numpy에서는 수동으로 해야하지만, # Create the one-hot encoded vector using NumPy one_hot_numpy = np.array([0, 1, 0]) # torch에서는 F 가 자동으로 수행해줌 # Create the one-hot encoded vector using PyTorch one_hot_pytorch = F.one_hot(torch.tensor(y), num_classes) Example import torch .. 2024. 4. 12.
Introduction to Deep Learning with PyTorch - [Chapter 1] Datacamp 무료계정이 있어서 각잡고 밑바닥부터인 PyTorch공부를 해 보려 한다. 정리는 거의 캡쳐한 거 위주로 나중에 다시 봤으면 좋겠다 싶은 것만 가져왔다. 실습코드로 공부하는 PyTorch도 진행할 예정 Chapter 1 : Introduction to deep learning with PyTorch You can use the .from_numpy() function to convert a NumPy array to a tensor. Tensor subtraction, addition, and element-wise multiplication have the same syntax as their NumPy counterparts. import torch # Create two tensors.. 2024. 4. 12.
[PyTorch] - CNN on Fashion MNIST(240411 , 공부기록 1일차) Colab https://colab.research.google.com/drive/1PoE9q4uWwayPGQLB7aClKecpuYRsudn2?usp=sharing PyTorch Tutorial1 : Training a CNN Classifier on Fashion MNIST.ipynb Colab notebook colab.research.google.com 어제 학습했던 LSTM stock forecasting 내용이 전부 이해가 되진 않아서 같은 재생목록에 있는 pytorch tutorial 3개를 모두 다 듣기로 하였음 (Tutorial 1) 첫 번째 영상인 CNN Classifier on Fashion MNIST 공부한 내용 딥러닝에서 train, test, val dataset을 사용할 때, 직.. 2024. 4. 12.
[PyTorch] - Tensor Manipulation pytorch 2일차입니다. CNN, LSTM stock forecasting 코드 따라치는데 텐서 조작이 너무 어려워서 trensor manipulation 깔작대어 보려구요 Tensor Indexing import torch x = torch.tensor([[1,2],[3,4]]) print(x) print(x[0]) print(x[:,0] #output #tensor([[1,2], #[3,4]]) #tensor([1,2]) #tensor([1,3]) view argument로는 바뀔 shape이 주어짐. tensor값은 동일하지만, shape이 바뀐 새로운 tensor return x = torch.randn(3,5) a = x.view(15) b = x.view(5, -1) print(x.size.. 2024. 4. 11.