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

本站现有博文328篇,共被浏览851139

本站已经建立2557天!

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