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
标签云
IndexTTS2 JSON Quantize LeetCode NLTK Github 图标 Augmentation MD5 HaggingFace Bin 多线程 Safetensors Quantization Data RGB CTC GIT Ubuntu AI Base64 C++ Pillow Streamlit VPN Logo 递归学习法 ChatGPT Hotel PDF Statistics Disk Hungarian Clash Shortcut Qwen2 PyTorch Python TSV LaTeX CV XGBoost Pytorch git-lfs Qwen2.5 算法题 Michelin 净利润 BTC git Proxy Agent TensorRT TTS DeepStream CAM BeautifulSoup uWSGI Freesound llama.cpp Tiktoken EXCEL Mixtral Pandas CLAP PDB TensorFlow Google NLP Paper 强化学习 ms-swift OpenCV torchinfo OpenAI LLM Django Numpy 论文速读 Docker Bert Use HuggingFace Domain Tensor Password ResNet-50 Plotly Plate Claude RL FP32 tqdm RAR 音频 Git Crawler Baidu LoRA Dataset Diagram Llama 报税 v0.dev FP64 Template Jetson WebCrawler Animate Hilton DeepSeek 继承 CC VGG-16 icon QWEN Web Image2Text Interview GoogLeNet ModelScope Paddle Ptyhon Bitcoin CEIR 财报 Breakpoint Translation GPT4 Land NameSilo SQLite SPIE ONNX Cloudreve Magnet GGML tar Pickle Tracking InvalidArgumentError Anaconda FP8 Permission Algorithm Knowledge PyCharm Search Card 域名 阿里云 Nginx Windows UI Vim 公式 Rebuttal Food COCO scipy CUDA 云服务器 OCR Review Color Jupyter Distillation 多进程 飞书 LLAMA WAN Bipartite diffusers 顶会 Heatmap Random SQL printf logger FastAPI 关于博主 Zip Gemma Vmess Datetime GPTQ CSV XML 腾讯云 Input News mmap hf BF16 版权 签证 Markdown Math Conda Qwen transformers Excel Sklearn SAM FP16 Miniforge FlashAttention Transformers Video PIP YOLO 搞笑 VSCode 图形思考法 v2ray Linux API SVR Firewall uwsgi 证件照 论文 Attention 第一性原理 Website UNIX
站点统计

本站现有博文332篇,共被浏览875139

本站已经建立2583天!

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