numpy와 tensor와의 관계 tensor : 호환성이 낮지만 gpu나 tensorflow 내부의 기능을 극대화 가능함 numpy : 호환성이 좋지만 tensorflow 기능을 극대화 하지 못함. tensorflow 외 pytorch에서도 사용 가능함 # numpy 기반 cifar10 데이터셋 (X_train, y_train), (X_test, y_test) = tf.keras.datasets.cifar10.load_data() # 방법1 : 데이터셋 전체를 기반으로 데이터를 만들어줌 tf.data.Dataset.from_tensors(X_train) tf.data.Dataset.from_tensors((X_train, y_train)) # 방법2 : 데이터 1개를 기반으로 만들어 줌 -> ML에 더..
전체 글
공부한 것, 배운 것들을 기록합니다tf.data : ML에 필요한 데이터 및 HW도 보장해줌 pipeline : ML 전 과정을 흐름에 따라 만드는 것, data가 중요함에 따라 data 자체의 흐름을 나타낸 것을 data pipelines. 왜 data pieline이 중요할까? 갈수록 data가 중요해지기 때문에. model이 크면 클수록 성능이 좋아지기 때문에, 그 성능을 좋게 하기 위해선 data를 많이 확보해야 함. data가 ML 입장에서는 항상 부족함. ML model에 입력하기 전까지의 data의 처리 과정을 data pipeline이라고 하고, NN 기반인 deep learning에 한정되어 있음. data가 많아도 순서에 따라 model의 성능이 결정되기도 함. 따라서 data를 섞어야 함. data를 섞는 것 자체도 ..
이미지는 array이지만 현실 세계에서는 파일로 저장하고, 파일마다 형식이 다르게 존재하고 있음. 파일 형식에 따라 이미지를 다양한 값의 조합으로 구현함(확장자가 중요한 것은 아님) 제일 중요한 것은, 파일을 불러와서 해석할 수 있어야 함 # tensorflow - GPU import tensorflow as tf im = tf.io.read_file('moon.jpg') t= tf.image.decode_image(im) ss = tf.cast(t, 'float32') ss/127.5 - 1 # -1 ~ 1로 만듦 # Opencv - CPU import cv2 s = cv2.imread('moon.jpg) s.dtype >> dtype('uint8') #강도 python opencv는 numpy 기본으..
1. Linux용 Windows 하위 시스템 옵셩 가능하도록 설정 2. PowerShell 관리자용으로 실행 후 명령어 입력 dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart 3. 컴퓨터 다시 시작 4. Linux 커널 업데이트 패키지 다운로드 wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi 5. PowerShell WSL2 기본 버전 설정 wsl --set-default-version 2 6. Microsoft Store Ubuntu 설치 7. 설치된 Ubuntu 실행 후 새 Linux 배포에 대한 사용자 계정 및 암호 만들기

https://leetcode.com/problems/department-highest-salary/ Department Highest Salary - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com DENSE RANK() 를 사용하여 출력하기 우선 DENSE RANK()와 RANK()의 차이점 output을 기준으로 보면, 다음과 같이 Salay가 내림차순으로 정렬이 되어 있다. - RANK() 함수 : Max 1위, Randy와 Joe 2위, 그리고 Will ..

https://leetcode.com/problems/department-highest-salary/ Department Highest Salary - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 처음 짠 쿼리 SELECT Top.Name AS Department, E1.Name AS Employee, E1.Salary FROM Employee AS E1 INNER JOIN (SELECT D.Name, E.DepartmentId, MAX(Salary) AS S..