목록전체 글 (87)
숟가락 그만 얹어

Vector norm의 정의 Vector의 길이 ||v||를 표현하는 수단. 자주 접하게 되는 l1-norm, l2-norm 등이 이에 해당한다. Positivity, homogeneity, triangle inequality를 만족해야 한다. Matrix norm의 정의 Linear operator의 크기 ||A||를 표현하는 수단. ||Ax||

God이 추천해주신 논문. 먼저, video generation 문제를 해결하기 위한 여러 approach가 소개되어 있어 유익했다. Video는 대부분의 경우 다음 상황이 쉽게 예측되기도 하지만 (공을 던지면 어디로 날아갈까?), 그렇지 않은 경우도 있다 (공이 바닥에 떨어지면 어디로 튈까?). 전자와 후자를 background/motion, content/pose, mse/adversarial loss 등으로 생각해 볼 수 있을 것이다. 본 논문에서는 deterministic/stochastic 관점에서 learned prior을 이용하여 deterministic predictor에 예측의 난이도 (uncertainty)를 넘겨주는 model을 제안하였다. 아래 그림에서 training은 (b), i..

Efficient implementation을 위해 위 식을 tensor 형태로 표현하면 Key : (batch_size, head, seq_length, d)Query : (batch_size, head, seq_length, d)A : (seq_length, seq_length, d) Tensor A는 embedding (i, j)의 learnable position distance 정보를 담고 있음. i와 j의 relative distance가 일정 이상 (k) 멀어지면 clip하여 설정한 index k 또는 -k의 embedding이 사용되도록 설계함. Query * Key : (batch, head, seq_length, seq_length)Query * A : (batch_size, head,..

PreprocessTime-grid based representation: 16-note interval로 quantization을 수행. 결과적으로 한 마디에 16개의 note가 찍힘. Monophony melody의 경우 128 note-on, 1 note-off, 1 rest로 총 130 class로 구성되며 drum의 경우 9개의 북 또는 심벌을 치는 경우의 수 2^9 class로 표현됨. (one-hot vector) Model- Recurrent VAE- Latent vectors can capture the global characteristic of data- Hierarchcal decoder: preventing posterior collapse / generating long-term..

Preprocess Event-based representation: note-on, note-off, time-shift, velocity에 대한 event를 one-hot vector로 표현하여 sequentially 나열한다. Model - Autoregressive LSTM - Input as 413-dimensional one-hot vectors - Teacher forcing for training - Sampling output from beam search 이외에도 music generation에 대한 전반적인 개요를 설명해주는 좋은 논문. References [1] S. Oore et al., This Time with Feeling: Learning Expressive Musical ..
gist.github.com/jakevdp/3808292

19년도에 진행했던 실험. TensorRT로 모델을 변환하면 CPU inference는 사용할 수 없으나 GPU inference 속도는 빨라짐. (TensorRT 변환 이후에는 get_weights가 불가하여 parameter size를 측정하지 못함) Tensorflow를 hardware dependent하게 직접 compile하고 Intel-MKL library를 활성화시켰더니 CPU inference 속도가 매우 개선됨.

VAE loss = likelihood + (beta * KL loss) Autoregressive VAE 중 posterior collapse를 방지하기 위해 고안된 scheduling technique으로 학습 초기에는 beta 값을 작게 하여 latent z에 의미 있는 정보가 담기도록 강제하고, beta 값을 점점 키워 prior에 맞추도록 한다. def kl_annealing(epoch, start, end, rate=0.9): return end + (start - end)*(rate)**epoch References [1] S. R. Bowman et al., Generating Sentences from a Continuous Space, CoNLL 2016

Seqeuence 모델을 VAE 형태로 표현하면 global latent z를 이용하여 다양한 속성의 sequence를 생성할 수 있다. 이때, decoder가 encoder의 condition을 무시하고 sequence를 생성하는 posterior collapse 현상이 자주 발생한다고 한다. VAE loss에서 KL term이 0이 되는, 어떤 local optima에 빠지는 상황인데 한동대 김인중 교수님께서 그 이유를 잘 정리해주셨다. Posterior collapse가 발생하는 이유 1. Decoder가 latent z 없이 과거 데이터만으로 충분히 generation이 가능한 경우 2. Ill-posed problem이기 때문에 조건에 맞는 다양한 latent z가 존재할 수 있는 가능성 3. ..
jupyter lab --generate-config python # SHA 기반 password 생성 from notebook.auth import passwd passwd() # 'sha1:...' 복사 vi /root/.jupyter/jupyter_notebook_config.py c.NotebookApp.allow_root = True c.NotebookApp.ip = '0.0.0.0' # if localhost c.NotebookApp.notebook_dir = '/shared/workspace/sjhan/' # root directory c.NotebookApp.open_browser = False c.NotebookApp.password = 'sha1:...' c.NotebookApp.por..