fix: 抑制PyTorch torch.load的FutureWarning噪音
This commit is contained in:
parent
79622678c7
commit
f548616df0
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user