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

Commit 4d75df9

Browse files
jon-towBradLarson
authored andcommitted
[Models] Fix enumeration of blocks in ResidualBasicBlockStack init (#192)
* [Models] Fix enumeration of blocks in `ResidualBasicBlockStack` initialization * Start range at * Update ranges
1 parent b353333 commit 4d75df9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Models/ImageClassification/ResNet50.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ public struct ResidualBasicBlockStack: Layer {
9999
public var blocks: [ResidualBasicBlock] = []
100100

101101
public init(featureCounts: (Int, Int, Int, Int), kernelSize: Int = 3, blockCount: Int) {
102-
for _ in 1..<blockCount {
102+
for _ in 0..<blockCount {
103103
blocks += [ResidualBasicBlock(featureCounts: featureCounts, kernelSize: kernelSize)]
104104
}
105105
}
@@ -168,7 +168,7 @@ public struct ResidualIdentityBlockStack: Layer {
168168
public var blocks: [ResidualIdentityBlock] = []
169169

170170
public init(featureCounts: (Int, Int, Int, Int), kernelSize: Int = 3, blockCount: Int) {
171-
for _ in 1..<blockCount {
171+
for _ in 0..<blockCount {
172172
blocks += [ResidualIdentityBlock(featureCounts: featureCounts, kernelSize: kernelSize)]
173173
}
174174
}

0 commit comments

Comments
 (0)