Study/AI

    [Pytorch] Tips for Loading Pre-trained Model

    The following errors may occur while loading a pre-trained model. RuntimeError: Error(s) in loading state_dict for model: Missing key(s) in state_dict: ~~~~ Unexpected key(s) in state_dict: ~~~~ Occurs when the key is not sufficient or the key name does not match. Setting "strict" as "false" can easily resolve this error. model.load_state_dict(checkpoint, strict=False) For more detail check docu..

    Lightweight Deep Learning

    모델 경량화의 필요성 경량화란 모델의 기존의 성능을 유지한채 더 적은 파라미터 수와 연산량을 가지는 모델을 만드는 것이다. 그렇다면 왜 경량화가 필요할까? AI 모델 학습에 들어가는 연산은 시간이 지나면서, 기하급수적으로 증가하고 있다. 또한 AI를 산업에 적용되기 위해서는 다양한 요구조건들이 고려된다. 이러한 상황에서 동일한 조건으로 최대의 결과를 얻기 위해서는 모델의 경량화/최적화 과정이 필요하다. 대표적인 경량화/최적화의 종류 네트워크 구조 관점 Efficient Architecture Design Network Pruning Knowledge Distillation Matrix / Tensor Decomposition Hardward 관점 Network Quantization Network Com..