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

Commit 11e0577

Browse files
author
Marc Rasi
committed
Revert "work around duplicate definition of diff witness (#234)"
This reverts commit b6593df.
1 parent acf4c34 commit 11e0577

File tree

6 files changed

+9
-17
lines changed

6 files changed

+9
-17
lines changed

MiniGo/Models/GoModel.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,7 @@ struct ConvBN: Layer {
5353
) {
5454
// TODO(jekbradbury): thread through bias and affine boolean arguments
5555
// (behavior is correct for inference but this should be changed for training)
56-
self.conv = Conv2D(
57-
filterShape: filterShape, strides: strides, padding: padding, activation: identity)
56+
self.conv = Conv2D(filterShape: filterShape, strides: strides, padding: padding)
5857
self.norm = BatchNorm(featureCount: filterShape.3, momentum: 0.95, epsilon: 1e-5)
5958
}
6059

Models/ImageClassification/DenseNet121.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,7 @@ extension DenseNet121 {
7171
conv = Conv2D(
7272
filterShape: (filterSize, filterSize, inputFilterCount, outputFilterCount),
7373
strides: (stride, stride),
74-
padding: .same,
75-
activation: identity
74+
padding: .same
7675
)
7776
}
7877

Models/ImageClassification/LeNet-5.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public struct LeNet: Layer {
3030
public var flatten = Flatten<Float>()
3131
public var fc1 = Dense<Float>(inputSize: 400, outputSize: 120, activation: relu)
3232
public var fc2 = Dense<Float>(inputSize: 120, outputSize: 84, activation: relu)
33-
public var fc3 = Dense<Float>(inputSize: 84, outputSize: 10, activation: identity)
33+
public var fc3 = Dense<Float>(inputSize: 84, outputSize: 10)
3434

3535
public init() {}
3636

Models/ImageClassification/ResNet50.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ public struct ConvBN: Layer {
3434
strides: (Int, Int) = (1, 1),
3535
padding: Padding = .valid
3636
) {
37-
self.conv = Conv2D(
38-
filterShape: filterShape, strides: strides, padding: padding, activation: identity)
37+
self.conv = Conv2D(filterShape: filterShape, strides: strides, padding: padding)
3938
self.norm = BatchNorm(featureCount: filterShape.3)
4039
}
4140

Models/ImageClassification/ResNetV2.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ public struct Conv2DBatchNorm: Layer {
3030
strides: (Int, Int) = (1, 1),
3131
padding: Padding = .valid
3232
) {
33-
self.conv = Conv2D(
34-
filterShape: filterShape, strides: strides, padding: padding, activation: identity)
33+
self.conv = Conv2D(filterShape: filterShape, strides: strides, padding: padding)
3534
self.norm = BatchNorm(featureCount: filterShape.3)
3635
}
3736

Models/ImageClassification/WideResNet.swift

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,14 @@ public struct BatchNormConv2DBlock: Layer {
3939
self.conv1 = Conv2D(
4040
filterShape: (kernelSize, kernelSize, featureCounts.0, featureCounts.1),
4141
strides: strides,
42-
padding: padding,
43-
activation: identity)
42+
padding: padding)
4443
self.norm2 = BatchNorm(featureCount: featureCounts.1)
4544
self.conv2 = Conv2D(filterShape: (kernelSize, kernelSize, featureCounts.1, featureCounts.1),
4645
strides: (1, 1),
47-
padding: padding,
48-
activation: identity)
46+
padding: padding)
4947
self.shortcut = Conv2D(filterShape: (1, 1, featureCounts.0, featureCounts.1),
5048
strides: strides,
51-
padding: padding,
52-
activation: identity)
49+
padding: padding)
5350
self.isExpansion = featureCounts.1 != featureCounts.0 || strides != (1, 1)
5451
}
5552

@@ -105,8 +102,7 @@ public struct WideResNet: Layer {
105102
public var classifier: Dense<Float>
106103

107104
public init(depthFactor: Int = 2, widenFactor: Int = 8) {
108-
self.l1 = Conv2D(
109-
filterShape: (3, 3, 3, 16), strides: (1, 1), padding: .same, activation: identity)
105+
self.l1 = Conv2D(filterShape: (3, 3, 3, 16), strides: (1, 1), padding: .same)
110106

111107
self.l2 = WideResNetBasicBlock(
112108
featureCounts: (16, 16 * widenFactor), depthFactor: depthFactor, initialStride: (1, 1))

0 commit comments

Comments
 (0)