EADST

Pytorch: Freeze layers to Finetune the Model

Pytorch: Freeze layers to Finetune the Model.

for k, v in model.named_parameters():
    print(k) # check the layer name
for k, v in model.named_parameters():
    if k in ["last.weight", "last.bias"]: # freeze the layer with the given name list
        v.requires_grad = True
    else:
        v.requires_grad = False
       
      
相关标签
About Me
XD
Goals determine what you are going to be.
Category
标签云
Datetime Interview 财报 签证 Heatmap Web BeautifulSoup Numpy Hotel git-lfs VSCode mmap C++ NLTK 算法题 SVR LLM 多进程 多线程 Proxy HaggingFace torchinfo Transformers Data 阿里云 Baidu Excel XGBoost Streamlit QWEN Vmess CLAP JSON diffusers CV TensorFlow VPN Translation Domain ResNet-50 Password Algorithm Markdown Ubuntu XML Image2Text Food IndexTTS2 BF16 Michelin Animate Plotly hf 音频 COCO Windows Review Bin Math GoogLeNet Knowledge SPIE printf Pytorch Qwen2.5 Quantize Jupyter PIP Sklearn Plate 搞笑 transformers Miniforge ModelScope SQL Color Anaconda scipy Template Linux logger Firewall Tensor Card Pandas PyCharm GIT OpenAI DeepStream CAM RGB 视频信息 关于博主 Gemma Hilton AI PyTorch GPT4 Zip Freesound Pillow Disk uWSGI PDB TSV FP16 Docker Mixtral Breakpoint FlashAttention CSV UI FP8 BTC CUDA 飞书 Conda RAR HuggingFace TTS LLAMA SQLite NLP Bert Augmentation NameSilo uwsgi Attention Python YOLO 版权 Crawler Hungarian Distillation Shortcut CEIR Statistics Qwen2 ONNX 公式 LaTeX 证件照 Tracking Ptyhon Diagram tqdm llama.cpp SAM InvalidArgumentError GPTQ Input GGML Tiktoken v2ray Base64 Logo TensorRT DeepSeek 报税 LeetCode Qwen 腾讯云 继承 Quantization VGG-16 LoRA Bipartite OCR MD5 FP64 Llama Bitcoin Random Permission EXCEL Website Clash API WAN Land Google git Claude Safetensors Paddle FP32 Nginx CC CTC OpenCV Dataset Video tar UNIX Use Vim Paper FastAPI 域名 v0.dev PDF ChatGPT Github Magnet Cloudreve Git Pickle WebCrawler 净利润 Django Jetson
站点统计

本站现有博文311篇,共被浏览741569

本站已经建立2380天!

热门文章
文章归档
回到顶部