Unverified Commit 99818fba authored by J-shang's avatar J-shang Committed by GitHub
Browse files

update ut & extend fast test windows timeout (#4558)

parent a36dc07e
...@@ -177,6 +177,7 @@ stages: ...@@ -177,6 +177,7 @@ stages:
- job: windows - job: windows
pool: pool:
vmImage: windows-latest vmImage: windows-latest
timeoutInMinutes: 70
steps: steps:
- template: templates/install-dependencies.yml - template: templates/install-dependencies.yml
......
...@@ -25,11 +25,11 @@ from nni.algorithms.compression.v2.pytorch.utils import compute_sparsity_mask2co ...@@ -25,11 +25,11 @@ from nni.algorithms.compression.v2.pytorch.utils import compute_sparsity_mask2co
class TorchModel(torch.nn.Module): class TorchModel(torch.nn.Module):
def __init__(self): def __init__(self):
super().__init__() super().__init__()
self.conv1 = torch.nn.Conv2d(1, 5, 5, 1) self.conv1 = torch.nn.Conv2d(1, 10, 5, 1)
self.bn1 = torch.nn.BatchNorm2d(5) self.bn1 = torch.nn.BatchNorm2d(10)
self.conv2 = torch.nn.Conv2d(5, 10, 5, 1) self.conv2 = torch.nn.Conv2d(10, 20, 5, 1)
self.bn2 = torch.nn.BatchNorm2d(10) self.bn2 = torch.nn.BatchNorm2d(20)
self.fc1 = torch.nn.Linear(4 * 4 * 10, 100) self.fc1 = torch.nn.Linear(4 * 4 * 20, 100)
self.fc2 = torch.nn.Linear(100, 10) self.fc2 = torch.nn.Linear(100, 10)
def forward(self, x): def forward(self, x):
...@@ -37,7 +37,7 @@ class TorchModel(torch.nn.Module): ...@@ -37,7 +37,7 @@ class TorchModel(torch.nn.Module):
x = F.max_pool2d(x, 2, 2) x = F.max_pool2d(x, 2, 2)
x = F.relu(self.bn2(self.conv2(x))) x = F.relu(self.bn2(self.conv2(x)))
x = F.max_pool2d(x, 2, 2) x = F.max_pool2d(x, 2, 2)
x = x.view(-1, 4 * 4 * 10) x = x.view(-1, 4 * 4 * 20)
x = F.relu(self.fc1(x)) x = F.relu(self.fc1(x))
x = self.fc2(x) x = self.fc2(x)
return F.log_softmax(x, dim=1) return F.log_softmax(x, dim=1)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment