풀이 import sys from collections import Counter N = int(sys.stdin.readline()) N_list = list(map(int, sys.stdin.readline().split(' '))) M = int(sys.stdin.readline()) M_list = list(map(int, sys.stdin.readline().split(' '))) N_cnt = Counter(N_list) for num in M_list: if N_cnt[num]: print(1) else: print(0) split( )으로 input을 받아주는게 포인트 나는 몇개인지 출력하는지 알고 Counter를 사용했다. 단순히 중복 여부라면 더 가벼운 코드로 구현하지만... 통과했으니..
모델 경량화의 필요성 경량화란 모델의 기존의 성능을 유지한채 더 적은 파라미터 수와 연산량을 가지는 모델을 만드는 것이다. 그렇다면 왜 경량화가 필요할까? AI 모델 학습에 들어가는 연산은 시간이 지나면서, 기하급수적으로 증가하고 있다. 또한 AI를 산업에 적용되기 위해서는 다양한 요구조건들이 고려된다. 이러한 상황에서 동일한 조건으로 최대의 결과를 얻기 위해서는 모델의 경량화/최적화 과정이 필요하다. 대표적인 경량화/최적화의 종류 네트워크 구조 관점 Efficient Architecture Design Network Pruning Knowledge Distillation Matrix / Tensor Decomposition Hardward 관점 Network Quantization Network Com..
풀이 import sys from collections import Counter cnt = int(sys.stdin.readline()) numbers = [] for i in range(cnt): num = int(sys.stdin.readline()) numbers.append(num) if cnt == 1: print(numbers[0], numbers[0], numbers[0], 0, sep='\n') else: numbers.sort() mode = Counter(numbers).most_common(2) print(round(sum(numbers)/cnt)) print(numbers[cnt//2]) if mode[0][1] == mode[1][1]: print(mode[1][0]) else:..
Software 1.0과 Software 2.0은 일종의 프로그래밍의 기술의 방법이다. Software 2.0이 나온 이후로 딥러닝은 엄청난 속도로 발전했다. 그렇다면 Software 1.0과 Software의 2.0이란 무엇이고 그 차이는 무엇일까? 먼저, Software 1.0의 정의는 다음과 같다. The “classical stack” of Software 1.0 is what we’re all familiar with — it is written in languages such as Python, C++, etc. It consists of explicit instructions to the computer written by a programmer. By writing each line of ..