replace print with algo_log
This commit is contained in:
@@ -22,6 +22,7 @@ from einops import rearrange
|
||||
from einops.layers.torch import Rearrange, Reduce
|
||||
from torch.backends import cudnn
|
||||
from sklearn.model_selection import train_test_split
|
||||
from logs.log import algo_log
|
||||
# writer = SummaryWriter('./TensorBoardX/')
|
||||
|
||||
|
||||
@@ -190,7 +191,7 @@ class ExP():
|
||||
# 自动选择设备:有 GPU 用 GPU,否则用 CPU
|
||||
self.device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
||||
# self.device = torch.device("cpu")
|
||||
print(f"Using device: {self.device}")
|
||||
algo_log(f"Using device: {self.device}", level="debug")
|
||||
|
||||
# 定义张量类型(不再强制使用 cuda)
|
||||
self.Tensor = torch.FloatTensor
|
||||
|
||||
Reference in New Issue
Block a user