pytorch
목차
PyTorch
examples
Optimization
Dataloader
Pytorch visualization
PyTorch + TensorBoard
# https://gist.github.com/avacariu/92db7b7f1fa1696279e9029f0237e2d4 #!/usr/bin/env python3.6 import time import tensorflow as tf summary_writer = tf.summary.FileWriter("./logdir") for i in range(100_000): s = tf.Summary(value=[tf.Summary.Value(tag="the-value", simple_value=i/10)]) summary_writer.add_summary(s, i) time.sleep(0.5) # while the above is running, execute # tensorboard --logdir ./logdir # See https://github.com/lanpa/tensorboard-pytorch/blob/master/tensorboardX/summary.py # for different kinds of summaries you can create (e.g. histograms)
Deployment
- pytorch + Nodejs
MongoDB에 모델 저장
col.insert_one(dict(state_dict=cloudpickle.dumps(net.state_dict())) state_dict = cloudpickle.loads(col.find_one()['state_dict'])
gradient 직접 수정
loss.backward() for p in model.parameters(): p.grad *= C # or whatever other operation optimizer.step()
gradient 사용 안함(학습 안함)
for param in model.parameters(): param.requires_grad = False
네트워크 시각화
others
pytorch - graph
deployment
Polyak averaging
soft_tau = 0.01 for target_param, param in zip(target_net.parameters(), net.parameters()): target_param.data.copy_(target_param.data * (1.0 - soft_tau) + param.data * soft_tau)
GPU
PyTroch TVM
PyTorch C++
options
torch.set_printoptions(linewidth=120) torch.set_grad_enabled(True)
custom layer 구현
RL
- RLkit: Reinforcement learning framework and algorithms implemented in PyTorch
scikit -> pytorch
Lazy Tensor
Computer Vision
Pytorch for ARM64
pytorch.txt · 마지막으로 수정됨: 2024/03/23 02:38 저자 127.0.0.1