본문 바로가기

AI HW/Transformer13

2024-01-30 화 musit 인수인계 보호되어 있는 글 입니다. 2024. 1. 30.
fm_quant 코드 분석 보호되어 있는 글 입니다. 2024. 1. 26.
DeiT에 대하여 다시 정리하면... https://velog.io/@heomollang/DeiT-%EA%B4%80%EB%A0%A8-%EB%85%BC%EB%AC%B8-%EB%A6%AC%EB%B7%B0-%EA%B0%9C%EC%9A%94-%EB%B0%8F-%EC%86%8C%EA%B0%9C [DeiT 관련 논문 리뷰] 01-개요 DeiT 모델을 이해하기 위해 세 개의 논문을 순차적으로 리뷰하도록 하겠습니다. Distilling the Knowledge in a Neural Network(2015) 이 논문에서 DeiT의 훈련 전략의 기초가 되는 distillation에 대해 이해하겠습니 velog.io DeiT는 ViT모델과 동일한 아키텍처(MLP head 제외)이며, convolution 연산 대신 self-attention 매커니즘을 사용하여.. 2024. 1. 23.
pytorch-image-models (Timm) model 코드분석 3 timm/models/deit.py """ DeiT - Data-efficient Image Transformers DeiT model defs and weights from https://github.com/facebookresearch/deit, original copyright below paper: `DeiT: Data-efficient Image Transformers` - https://arxiv.org/abs/2012.12877 paper: `DeiT III: Revenge of the ViT` - https://arxiv.org/abs/2204.07118 Modifications copyright 2021, Ross Wightman """ # Copyright (c) 2015-present.. 2024. 1. 23.
pytorch-image-models (Timm) model 코드분석 2 5. timm/models/_efficientnet_blocks.py """ EfficientNet, MobileNetV3, etc Blocks Hacked together by / Copyright 2019, Ross Wightman """ import torch import torch.nn as nn from torch.nn import functional as F from timm.layers import create_conv2d, DropPath, make_divisible, create_act_layer, get_norm_act_layer __all__ = [ 'SqueezeExcite', 'ConvBnAct', 'DepthwiseSeparableConv', 'InvertedResidual', .. 2024. 1. 22.
pytorch-image-models (Timm) model 코드분석 1 DeiT모델이 어떻게 코드로 구현되어 있는지 숙지해야하는데, DeiT의 모델은 timm에서 구현한 vit 및 deit 모델을 가져와 사용한다. timm에 있는 vit & deit 코드를 보며 모델이 어떻게 구성되어 있는지 확인해 보고 싶고 앞으로 timm에 있는 models의 코드를 하나씩 설명하고자 한다. 1. _pruned - 하나의 딥러닝 모델의 가중치(weight)를 설명 - 각각의 "conv"는 합성곱 레이어 & "bn"은 배치 정규화(batch normalization) 레이어 & "se.conv"는 Squeeze-and-Excitation(SE) 모듈의 합성곱 가중치 & "downsample"은 다운샘플링을 위한 레이어 ex) layer1.0.conv1.weight는 ResNet 등의 레지듀.. 2024. 1. 22.