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

本站现有博文337篇,共被浏览961143次

本站已经建立2673天!

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