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

本站现有博文333篇,共被浏览916171

本站已经建立2620天!

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