fix: 抑制PyTorch torch.load的FutureWarning噪音

This commit is contained in:
tian 2026-06-10 10:34:13 +08:00
parent 79622678c7
commit f548616df0

View File

@ -13,6 +13,8 @@ import math
# PyTorch 为可选依赖
try:
import warnings
warnings.filterwarnings('ignore', message='You are using `torch.load` with `weights_only=False`')
import torch
import torch.nn as nn
from torch.utils.data import DataLoader