Super Kawaii Cute Cat Kaoani '연구' 카테고리의 글 목록 (4 Page)
728x90

연구 71

[PyTorch] Tensor 조작법 기본) indexing, view, squeeze, unsqueeze

tensor 쓰는법이 안익숙해서 numpy array로 버티면서 코딩하다가..ㅋㅋㅎㅎ더이상 안될것같아 코드 전체를 tensor 기반으로 바꾸는 작업을 진행하게 되었다. 쓰다보면 당연히 체화되어 익숙해질테지만 그래도 어느정도는 공부하는게 좋지 않을까 싶어 tensor 조작법을 정리해보았다! 1) torch.Tensor()와 torch.tensor()의 차이 * torch.Tensor는 Tensor 자료구조의 클래스로, 이 클래스를 사용하면 클래스 인스턴스를 생성할 수 있다. T = torch.Tensor() 라고 입력하면 T는 Tensor 클래스의 인스턴스가 된다. T의 경우 data를 입력해주지 않았으니 빈 tensor가 된다. * torch.tensor는 어떤 data를 tensor로 copy해주는 클..

연구/PyTorch 2023.09.17

PyTorch로 AutoEncoder 구현하기

1. 개념요약 AutoEncoder는 앞부분을 Encoder, 뒷부분을 Decoder라고 부른다. Encoder는 정보를 받아서 이를 압축하고 Decoder는 압축된 정보를 복원하는 역할을 한다. AutoEncoder를 사용하면 필연적으로 정보의 손실이 일어나지만, 이는 불필요한 정보를 줄이고 필요한 정보만 남기는 데이터 가공이라고 볼 수 있다. 이렇게 불필요한 정보를 줄이는 AutoEncoder를 사용하면 복잡한 데이터의 차원을 줄일 수 있다. 따라서 AutoEncoder는 Input data의 feature를 추출할 때 많이 사용된다. 2. AutoEncoder 구현 import torch import torchvision import torch.nn.functional as F from torch ..

연구/PyTorch 2023.08.16

ZeroEGGS: Zero-shot Example-based Gesture Generation from Speech 논문세미나 준비

0-1. System overview 설명 * speech와 원하는 style의 짧은 reference motion clip을 Input으로 받아 speech에 적절하면서도 원하는 style을 가지는 gesture를 생성해냄. * framework는 총 3개의 component로 이루어져있는데, 1) speech encoder 부분, 2) style encoder 부분, 3) gesture generator 부분으로 이루어져있음 speech encoder 부분은 raw audio data를 받아서 speech embedding sequence로 변형시킴 style encoder 부분은 reference style animation clip을 받아서 style을 capture하는 fixed size emb..

PyTorch DataLoader 사용하기 & epoch, batch, iteration 개념

PyToch DataLoader를 사용하는 방법 및 epoch, batch, iteration 개념에 대해 살펴보자. epoch, batch, iteration 개념 epoch: 전체 데이터 셋을 반복하는 횟수 전체 데이터셋으로 forward propagation(순전파)와 backward propagation(역전파)가 완료되면 1번의 epoch가 진행되었다고 보면 된다. 반복적인 학습을 통해 높은 정확도의 모델을 만들 수 있다. epoch 값을 너무 낮게 설정하면 underfitting, 너무 높게 설정하면 overfitting이 발생할 확률이 높아진다. batch size: forward와 backward에서 한번에 학습할 데이터 수 모델 학습 중 parameter를 업데이트 할 때 사용할 데이터 ..

연구/PyTorch 2023.08.03

Pytorch에서 TensorBoard 사용하기

머신러닝을 진행할 때, 네트워크가 어떻게 학습이 되고 있는지 확인하기 위해서는 loss 그래프 등을 확인할 필요가 있다. 이때 흔히 사용하는 것이 TensorBoard이다. Tensorboard는 다음과 같은 기능을 제공한다. 손실 및 정확도와 같은 측정항목 추적 및 시각화 모델 그래프(작업 및 레이어) 시각화 시간의 경과에 따라 달라지는 가중치, 편향, 기타 텐서의 히스토그램 확인 저차원 공간에 임베딩 투영 이미지, 텍스트, 오디오 데이터 표시 TensorFlow 프로그램 프로파일링 그 외 다양한 도구 그럼 Pytorch에서 Tensorbard를 어떻게 사용할 수 있을지 알아보자! 1. SummaryWriter 인스턴스 생성하기 import torch from torch.utils.tensorboard..

연구/PyTorch 2023.08.03

6D Rotational representation 설명 및 구현

Rotation Matrix 기존에 딥러닝에서 많이 사용하던 rotational representation은 Rotation matrix이다. continuous하게 1-to-1 mapping을 할 수 있다는 장점이 있지만 9 numbers를 딥러닝에 다 사용하기엔...부담스러운 면이 많다. 그래서 최근에 많이 사용하는 rotation representation은 6D Rotational Representation이다. 6D Rotational Representation 어렵게 생각할 필요가 없는게 기존의 rotation matrix에서 column 2개만 가져오면 된다. 두 colmns만 가져오면 나머지 하나의 column은 cross product를 사용해 구할 수 있다. (rotation matri..

ZeroEGGS: Zero-shot Example-based Gesture Generation from Speech 논문리뷰

오늘두 역시나 gesture generation 관련 논문 리뷰! 작년 Siggraph Asia에서 직접 발표를 들었던 논문이라 더 반갑게 읽었던 것 같다. 그때도 생각했던거지만 다시봐도 결과물의 퀄리티가 꽤 괜찮다. 교수님 허락만 맡으면 논문세미나에서 발표할 생각이라 꽤 열심히 읽었지롱 https://arxiv.org/abs/2209.07556 ZeroEGGS: Zero-shot Example-based Gesture Generation from Speech We present ZeroEGGS, a neural network framework for speech-driven gesture generation with zero-shot style control by example. This means s..

Pytorch로 dataset 구성하기

딥러닝 모델을 학습시키기 위해 가장 먼저 필요한 준비물은 "데이터"이다. 주어진 데이터를 효과적으로 활용하기 위해, pytorch에서는 Dataset 클래스를 제공하고 있다. pytorch의 Dataset 클래스를 활용해서 학습을 위한 데이터셋을 어떻게 만들 수 있을지 알아보자. step1. 클래스 정의 사용할 모듈은 다음과 같다. import os import torch from torch.utils.data import Dataset from PIL import Image import torchvision.transforms as transforms 커스텀 데이터셋을 만들기 위해 클래스를 만들어보자. class MyBaseDataset(Dataset): def __init__(self, x_data,..

연구/PyTorch 2023.07.27

Speech Gesture Generation from the Trimodal Context of Text, Audio and Speaker Identity 논문 리뷰

집중안되는데 용케 다 읽었다..고생했으 https://arxiv.org/abs/2009.02119 Speech Gesture Generation from the Trimodal Context of Text, Audio, and Speaker Identity For human-like agents, including virtual avatars and social robots, making proper gestures while speaking is crucial in human--agent interaction. Co-speech gestures enhance interaction experiences and make the agents look alive. However, it is difficult ..

728x90
728x90