딥러닝%20학습방법%20파트-3.pdf
112~
conda create -n AI python=3.11
activate AI
conda install pytorch torchvision torchaudio pytorch-cuda=11.7 -c pytorch -c nvidia
conda info --envs
conda remove --name [가상환경명] --all
[오전 11:05] MSAI2_선생님4
pip freeze > requirements.txt
like 2개
[오전 11:06] MSAI2_선생님4
pip install -r 0710requirements.txt
like 1개
absl-py==1.4.0
brotlipy==0.7.0
cachetools==5.3.1
colorama==0.4.6
contourpy==1.1.0
cycler==0.11.0
fonttools==4.40.0
google-auth==2.21.0
google-auth-oauthlib==1.0.0
grpcio==1.56.0
kiwisolver==1.4.4
Markdown==3.4.3
matplotlib==3.7.2
mkl-fft==1.3.6
mkl-service==2.4.0
mpmath==1.2.1
oauthlib==3.2.2
opencv-python==4.7.0.68
packaging==23.1
pandas==2.0.3
Pillow==9.4.0
protobuf==4.23.4
pyasn1==0.5.0
pyasn1-modules==0.3.0
pyparsing==3.0.9
python-dateutil==2.8.2
pytz==2023.3
requests-oauthlib==1.3.1
rsa==4.9
seaborn==0.12.2
six==1.16.0
tensorboard==2.13.0
tensorboard-data-server==0.7.1
tqdm==4.65.0
tzdata==2023.3
Werkzeug==2.3.6
main.py
import torch
import torch.nn as nn
import torch.optim as optim
import torchvision.transforms as transform
from torch.utils.data import DataLoader
from torchvision.datasets import CIFAR10
from torchvision.models import resnet18
from sklearn.ensemble import BaggingClassifier
from sklearn.tree import DecisionTreeClassifier
from sklearn.metrics import accuracy_score
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
train_transform = transform.Compose(
[
transform.RandomHorizontalFlip(),
transform.RandomVerticalFlip(),
transform.RandAugment(),
transform.ToTensor(),
transform.Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5))
]
)
test_transform = transform.Compose([
transform.ToTensor(),
transform.Normalize((0.5,0.5,0.5), (0.5,0.5,0.5))
])
train_dataset = CIFAR10(root="./data", train=True,download=True, transform=train_transform)
test_dataset = CIFAR10(root="./data", train=False,download=False, transform=test_transform)
train_loader = DataLoader(train_dataset, batch_size=128, shuffle=True, num_workers=2)
test_loader = DataLoader(test_dataset, batch_size=128, shuffle=False, num_workers=2)
model = resnet18(pretrained=True)
num_features = model.fc.in_features
model.fc = nn.Linear(num_features, 10)
print("fc in features >>", num_features)
print(model)
VideoMAE: Masked Autoencoders are Data-Efficient
https://arxiv.org/pdf/2203.12602.pdf
2021 생성모델 연구 동향 및 주요 논문 /
AI Content Creation: Deep Generative Model
https://happy-jihye.github.io/gan/gan-25/