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

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

本站已经建立2579天!

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