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

本站现有博文321篇,共被浏览779085

本站已经建立2470天!

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