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

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

本站已经建立2579天!

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