목록Artificial Intelligence/Deep Learning (27)
ROKO

https://github.com/tmux/tmux/wiki Hometmux source code. Contribute to tmux/tmux development by creating an account on GitHub.github.com 서버에서 코드를 작업하던 중 네트워크 문제로 서버와 연결이 끊기는 상황이 자주 발생하였다. 학습이라도 돌리고 있는 상황이라면 큰 문제가 발생할 수 있는데, 이럴땐 실행중인 프로세스를 백그라운드로 돌리면 된다. 이를 위해 사용할 수 있는 쉬운 수단이 tmux이다. 리눅스에서 그냥 프로세스 백그라운드로 돌리면 되지 왜 굳이 tmux를 써야하는가?대표적인 장점을 나열해보겠다.하나의 터미널을 분할하여 여러 터미널을 실행 할 수 있다.이는 모니터링이나 다양한 작업을 동시에..
본론부터 얘기하자면 사실이다. huggingface datasets 에서 데이터를 받아 구조를 살펴볼때 dict 자료구조처럼 구성이 되어있고 실제로도 dict 접근법이 적용가능하다. 최근 datasets의 데이터를 받아 데이터 증강을 해야하는 일이 있었다. 그런데 dict 자료구조 기준으로 코드를 구성할시 에러가 발생했다. Error codeKeyError: 'exact_answer''exact_answer'는 내가 추가하고자하는 값의 key 이름이였고 해당하는 값이 존재하지 않는다는 에러이다. why?huggingface datasets은 dict이 아닌 arrow 라는 특수한 구조를 가진다.https://huggingface.co/docs/datasets/en/about_arrow Datasets ?..

복습 겸 DQN에 관련한 문제를 풀어보자. 위 문제의 정답은 1번과 2번이다. 1번의 경우 Monte carlo sampling에 의해 수렴할 것이 보장된다. 2번의 경우 무한히 많은 tuple이 있으므로 population과 같다고 볼 수 있어 estimated dynamics model을 통한 policy evaluation은 같은 결과를 나타낼 것이다. 3번의 경우 experience replay는 temporal correlation을 줄이기 위한 방법이지 convergence를 보장하기 위한 방법이 아니다. Policy GradientPolicy gradient methods have been very influentialSequence Level Training with Recurrent Ne..

1번 질문은 Deterministic이다. policy 식을 보면 arg max로 가장 큰 값을 가지는 선택지 하나를 선택하는 것이므로 deterministic하다. 2번 질문은 False이다. policy가 deterministic 이므로 모든 s,a에 대해서 값을 구할 수는 없다. 가장 좋은 값을 가지는 선택지 하나만 선택하여 임의의 action에 대해 exploration을 하지 않기 때문이다. 3 장에서는 a model of how the world works 에서 evaluation을 보았다면 이번 장은 control에 대해서 알아본다.2번 질문을 동기로 exploration을 하기 위한 방법론을 알아보자.General Policy Iteration (GPI)Policy Iteration과 Po..

Lecture 1,2 에서는 world, environment가 어떻게 구성되고 돌아가는지 알고 있는 가정에서 살펴보았다.흔히 model-based method라고 불리는데 이번 lecture에서는 world를 모르는 model-free에 대해서 알아본다. Policy evaluationEstimating the expected return of a particular policy if don't have access to true MDP models Monte Carlo policy evaluationPolicy evaluation when don't have a model of how the world workMonte Carlo (MC) Policy Evaluation만약 policy로부터 samp..

Markov Decision Process (MDP)Markov Reward Process + actions MDP is a tuple:

Reinforcement learning (RL)Learning through experience / data to make good decisions under uncertaintyEssential part of intelligenceBuilds strongly from theory and ideas starting in the 1950s with Richard BellmanA number of impressive successes in the last decadeExamples of RL출처: https://www.nature.com/articles/nature24270%20 출처: https://openai.com/blog/chatgpt/ 출처: https://arxiv.org/pdf/1709.06..

TransformerAttention + CMMSelf-attention: calculate attention parallelMulti-head attention: rich representationsSelf-attentionMulti-head attentionTransformer architecture

Sequence to sequence modeldecoder에서 막연히 전체 문장을 greedy decoding으로 생성하면 안될까라는 생각이 들 수 있다. 하지만 greedy decoding을 사용하면 전체 문맥을 고려하지않고 앞부분에서 생성된 출력만을 기준으로 찾게되어 부정확한 출력이 나올 수 있다. 또한 greedy search는 엄청나게 많은 search space를 소비한다.Beam search & Length normalizationBeam search 과정에서 text length가 길어질수록 text token 수가 많아져 error값이 커지고 모델은 적은 loss를 얻기 위해 짧은 text 를 출력하는것을 선호하게 된다. 이를 방지하기 위해 loss function에 length nor..

1-hot representation1-hot representation은 각 단어를 구분하기에는 좋지만 단어간의 유사성을 유지하기는 어렵다. Featured representation: word embedding각 차원마다 특징을 기준으로 학습하도록 할 수 있다면 더 풍부한 표현을 가진 word vector가 생길 것이다.word vector를 시각화한 3D 공간을 보면 비슷한 단어들끼리 뭉쳐있다. Transfer learning and word embeddingsLearn word embeddings from large text corpusTransfer embedding to new task with smaller training setOptional: Continue to finetune the..