pytorch 6
-
https://developer.nvidia.com/cudnn NVIDIA cuDNN NVIDIA cuDNN The NVIDIA CUDA® Deep Neural Network library (cuDNN) is a GPU-accelerated library of primitives for deep neural networks. cuDNN provides highly tuned implementations for standard routines such as forward and backward convolution, pooling, nor developer.nvidia.com 로컬에서 GPU를 사용하기 위해 cuda를 다운받는다. 장치관리자에 어떤 GPU를 쓰고 있는지 확인하고 GPU를 학습에 쓸 수 있는..
-
import torch import torch.nn as nn try: from torch.hub import load_state_dict_from_url except ImportError: from torch.utils.model_zoo import load_url as load_state_dict_from_url from typing import Any __all__ = ['AlexNet', 'alexnet'] model_urls = { 'alexnet': 'https://download.pytorch.org/models/alexnet-owt-4df8aa71.pth', } class AlexNet(nn.Module): def __init__(self, num_classes: int = 1000) ->..
-
-
-
전치 transposing, 인덱싱, 슬라이싱, 수식, 선형대수, 임의 샘플링 등의 연산을 할 수 있다. https://pytorch.org/docs/stable/torch.html torch — PyTorch 1.9.0 documentation Shortcuts pytorch.org Tensor연산 레퍼런스를 볼 수 있다. 텐서의 연산은 CPU보다 GPU가 빠르기 때문에 Edit->Notebook settings에서 GPU로 명시적으로 이동할 수 있다. IPU(Intelligence Processing Unit)이 개발되며 IPU로 연산하는 경우도 있다. 디바이스를 cuda로 할당하였다. Tensor 합치기 cat과 stack DATASET 데이터 샘플을 처리하는 코드는 가독성과 모듈성이 중요하다. 데..
-
PyTorch 설치 https://pytorch.org/get-started/locally/#anaconda PyTorch An open source machine learning framework that accelerates the path from research prototyping to production deployment. pytorch.org 자신이 가지고 있는 조건을 확인하고 적절히 선택해서 설치한다. Anaconda3는 파이썬 보안 프로젝트를 하면서 사용한 적이 있다. Cuda를 추가로 설치하고, 명령어를 Anaconda Prompt에서 실행하면 PyTorch의 패키지들이 설치된다. 설치에 관련된 자세한 내용은 이 블로그에서 참고했다. https://blog.daum.net/geosci..