Skip to content
This repository was archived by the owner on Apr 23, 2025. It is now read-only.

Commit 35207ba

Browse files
brettkooncerxwei
authored andcommitted
clean up wide resnet, fix block (#136)
1 parent 5105486 commit 35207ba

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

CIFAR/wide_resnet.swift

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,7 @@ struct WideResnet28FirstBasicBlock: Layer {
182182

183183
@differentiable
184184
func call(_ input: Input) -> Output {
185-
let blockLayer = input.sequenced(through: block1, block2, block3, block4)
186-
return blockLayer + shortcut(input)
185+
return input.sequenced(through: block1, block2, block3, block4) + shortcut(input)
187186
}
188187
}
189188

@@ -226,7 +225,7 @@ struct WideResnet28BasicBlock: Layer {
226225

227226
@differentiable
228227
func call(_ input: Input) -> Output {
229-
return input.sequenced(through: block1, block2) + shortcut(input)
228+
return input.sequenced(through: block1, block2, block3, block4) + shortcut(input)
230229
}
231230
}
232231

@@ -260,4 +259,3 @@ struct WideResNet28: Layer {
260259
return finalNorm.sequenced(through: avgPool, flatten, classifier)
261260
}
262261
}
263-

0 commit comments

Comments
 (0)