본문 바로가기

반응형

전체 글

(57)
[Python] 문자열에서 숫자만 추출하기 1. 모든 숫자들을 1개의 문자열로 추출 : re.sub()sub()는 string에서 pattern과 일치하는 문자들을 repl로 교체합니다.re.sub(pattern, repl, string) 다음과 같이 sub()를 사용하여 문자열에서 숫자가 아닌 문자를 모두 제거하고 숫자로 구성된 문자열을 만들 수 있습니다.import restring = 'aaa1234, ^&*2233pp'numbers = re.sub(r'[^0-9]', '', string)print(numbers) Output:123422332.연속된 숫자들을 추출하여 List로 리턴 : re.findall()re.findall(pattern, string)은 string에서 pattern에 해당하는 내용들을 찾아서 리스트로 리턴합니다. r'..
nvcc -V : /usr/bin/nvcc: No such file or directory export PATH=/path/to/cuda/bin:$PATHnvcc --version-bash: /usr/bin/nvcc: No such file or directory cuda version check를 위해 위의 명령어를 쳤더니 디렉토리를 찾을 수 없다고 떴다.  1. Check CUDA installation2. Check CUDA Toolkit installation3. Update your PATH environment variable  3번을 위해서 export PATH=/path/to/cuda/bin:$PATH source ~/.bashrc
페이지 교체 알고리즘 - LRU(Least recently used) 페이지 교체 알고리즘 페이징 기법. 메모리 관리하는 os에서, 페이지 부재가 발생하여 새로운 페이지를 할당하기 위해, 현재 할당된 페이지 중 어느것과 교체할 지 결정하는 방법 FIFO - first in first out LFU - least frequently usedLRU - least recently used  Cache Cache Hit - 캐시 메모리에 찾는 데이터가 존재 Cache Miss - 캐시 메모리에 찾는 데이터가 존재하지 않음 -> 메모리 저장소로부터 필요한 데이터를 찾아 캐시메모리에 로드 LRU 알고리즘  참조 스트링 순서대로 저장4초 - 1이 재참조 되었으므로, 순서 변경6초 - cache size 가 찻으므로, least recently used item 제거 , 5 저장  ca..
CS231n - Lec14. Deep Reinforcement Learning What is reinforce learning? agent: 행동 environment: 보상 , next state Markow Decision Process - RL problem formalism MDP는 Markov property를 만족함 Markow property : 현재 상태만으로 전체 상태를 나타내는 성질 discount factor: 보상받는 시간에 대해 우리가 얼마나 중요하게 생각할지 정책 pi : 각 상태에서 agent가 어떤 행동을 취할지 명시 MDP 정의 => 최적의 정책 pi* 찾아야함 (보상의 합 최대화) 우리가 어떤 상태에 있더라도 그 상황에서 보상을 최대화시킬 수 있는 행동 알려줌 Value Function and Q-Value function : definition 상..
CS231n- Lec13. Generative Models Unsupervised Learning just data, no labels Goal: Learn some underlying hidden structure of the data Examples: Clustering, dimensionality reduction, feature learning, density estimation, etc. Generative Models training data 와 같은 분포에서 새로운 sample을 생성하는 model model's prob(x)가 최대한 data's prob(x)와 가깝게 만드는것이 목표 super resolution, colorization ... PixelRNN and PixelCNN PixelRNN fully visible brief networ..
CS231n - Lec12. Visualizing and Understanding Whats going on inside convnets? what types of things in the image they are looking for analyzing this internals of the network? common criticism of deep learning : to trust network, understand the nature, black box of convnets Visualizing Activations First Layer: Visualize Filters AlexNet conv filter 3x11x11 입력 이미지와 직접 내적 수행하기때문에 이 필터가 이미지에서 무엇을 찾고있는지 알아낼 수 있음 64개의 11x11 filter oriented edges, o..
CS231n - Lec11. Detection and Segmentation Other computer vision tasks Semantic Segmentation output the pixel of segment grass/cat/tree/sky (category label) label each pixel in the image with a category label dont defferentiate instances, only care about pixels idea: sliding window take crops, what is the center of this crop , apply on crop rather than whole image this is computationally expensive idea2 : fully convolutional input 3 x H ..
CS231n - Lec10. Recurrent Neural Networks 1 image - fixed size output vector 2 image captioning 3 sentiment classification (positive/negative) 4 translation 5 video classification (each frame) sequential processing of fixed outputs RNN 가변 input 가변 output input - RNN (has internal hidden state) -output (usually wnat to predict a vetctor at some time steps) vanilla recurrent neural network ( a state consists of a single hidden vector h ) ..

반응형