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

本站现有博文318篇,共被浏览748953

本站已经建立2400天!

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