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

clean up wide resnet, fix block #136

Merged
merged 1 commit into from
Apr 29, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions CIFAR/wide_resnet.swift
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,7 @@ struct WideResnet28FirstBasicBlock: Layer {

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

Expand Down Expand Up @@ -212,7 +211,7 @@ struct WideResnet28BasicBlock: Layer {

@differentiable
func call(_ input: Input) -> Output {
return input.sequenced(through: block1, block2) + shortcut(input)
return input.sequenced(through: block1, block2, block3, block4) + shortcut(input)
}
}

Expand Down Expand Up @@ -246,4 +245,3 @@ struct WideResNet28: Layer {
return finalNorm.sequenced(through: avgPool, flatten, classifier)
}
}