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

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

本站已经建立2600天!

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