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

[Models] Fix enumeration of blocks in ResidualBasicBlockStack init #192

Merged
merged 3 commits into from
Aug 7, 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
4 changes: 2 additions & 2 deletions Models/ImageClassification/ResNet50.swift
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public struct ResidualBasicBlockStack: Layer {
public var blocks: [ResidualBasicBlock] = []

public init(featureCounts: (Int, Int, Int, Int), kernelSize: Int = 3, blockCount: Int) {
for _ in 1..<blockCount {
for _ in 0..<blockCount {
blocks += [ResidualBasicBlock(featureCounts: featureCounts, kernelSize: kernelSize)]
}
}
Expand Down Expand Up @@ -168,7 +168,7 @@ public struct ResidualIdentityBlockStack: Layer {
public var blocks: [ResidualIdentityBlock] = []

public init(featureCounts: (Int, Int, Int, Int), kernelSize: Int = 3, blockCount: Int) {
for _ in 1..<blockCount {
for _ in 0..<blockCount {
blocks += [ResidualIdentityBlock(featureCounts: featureCounts, kernelSize: kernelSize)]
}
}
Expand Down