style: 修改为显式导入
This commit is contained in:
@@ -17,7 +17,6 @@ def test_single_process():
|
||||
for epoch in range(3):
|
||||
for iteration in range(10):
|
||||
x = torch.randn(32, 10)
|
||||
y = torch.randn(32, 5)
|
||||
loss = model(x).mean()
|
||||
loss.backward()
|
||||
optimizer.step()
|
||||
@@ -44,7 +43,6 @@ def simple_training():
|
||||
for epoch in range(2):
|
||||
for iteration in range(5):
|
||||
x = torch.randn(16, 10)
|
||||
y = torch.randn(16, 5)
|
||||
loss = model(x).mean()
|
||||
loss.backward()
|
||||
optimizer.step()
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import numpy as np
|
||||
import torch
|
||||
|
||||
from astrai.data.dataset import *
|
||||
from astrai.data.dataset import DatasetFactory
|
||||
from astrai.data.serialization import save_h5
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
from astrai.data import *
|
||||
from astrai.trainer import *
|
||||
from astrai.data import ResumableDistributedSampler
|
||||
|
||||
|
||||
def test_random_sampler_consistency(random_dataset):
|
||||
|
||||
Reference in New Issue
Block a user