python (4) 썸네일형 리스트형 CPU(NumPy) and GPU(CuPy and PyTorch) 성능 비교 개요CPU(NumPy) and GPU(CuPy and PyTorch) 비교 테스트 내용행렬 곱셈 성능 비교:NumPy(CPU), CuPy(GPU), PyTorch(GPU) 구현을 비교다양한 행렬 크기 [128, 256, 512, 1024, 2048] 에 대해 테스트각 구현의 실행 시간과 CPU 대비 속도 향상을 측정실행 시간 시각화신경망 학습 성능 비교:간단한 이진 분류 신경망을 구현CPU와 GPU 기반 학습 시간을 비교다양한 히든 레이어 크기(64, 128, 256)에 대해 테스트각 설정에서의 학습 시간과 GPU 가속 효과를 측정구현 및 테스트 환경 : Colab PRO (GPU : Tesla T4)# GPU 사용 가능 여부 확인import torchprint(f"PyTorch version: {tor.. Series 51~130 문제 연습 데이터 분석 입문자를 위한 파이썬 판다스 300제Series 51~130 문제 연습https://wikidocs.net/book/4852# -*- coding: utf-8 -*-"""Series51-130.ipynbAutomatically generated by Colab.Original file is located at https://colab.research.google.com/drive/1ouagvgjFcrJtlrTIIPdpVNn6n6X6DtbM"""import pandas as pdfrom pandas import Seriesimport numpy as npdata = [100, 200, 300]score = Series(data)print(score)index = ['철수', '영희', '.. numpy 1~50 문제 연습 데이터 분석 입문자를 위한 파이썬 판다스 300제numpy 1~50 문제 연습https://wikidocs.net/book/4852# -*- coding: utf-8 -*-"""numpy1-50.ipynbAutomatically generated by Colab."""import numpy as npdata = [1,2,3]np_data = np.array(data)print(np_data)np_array = np.arange(0,100)np_arraynp_array = np.arange(3, 30, 3)np_arraynp_array = np.arange(0, 1000, 2)np_arraynp_array = np.arange(0, 1, 0.1)np_arraydata = [0, 1, 2, 3, 4, 5]n.. 파이썬(Python) 클래스 요약 핵심 키워드classinstanceinheritance학습 요약클래스는 딥러닝 프로그램을 작성할 때 자주 사용된다.클래스: 붕어빵 틀에 비유할 수 있다.인스턴스: 붕어빵 틀에서 생성된 붕어빵에 비유할 수 있다.간단히 사람(human)에 대한 정보를 담는 사람 클래스를 정의해 보자.프로그램 내에서 두 명의 사람을 처리한다면?각 사람은 나이(age)가 다를 수 있다.class Human: def __init__(self): self.age = 0 def old(self): self.age += 1human1 = Human() # 사람 인스턴스 생성human2 = Human() # 사람 인스턴스 생성for i in range(10): # 10세 human1.old()f.. 이전 1 다음