Skip to content
This repository was archived by the owner on Jul 1, 2023. It is now read-only.

Commit 727c600

Browse files
committed
Add explicit Sequential.TangentVector.VectorSpaceScalar typealias.
1 parent c73af66 commit 727c600

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Sources/TensorFlow/Layers/Sequential.swift

+7
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,13 @@ extension Sequential: Layer where Layer1: Layer {
7474
}
7575
}
7676

77+
extension Sequential.TangentVector {
78+
/// - Note: this typealias declaration is necessary for building with old non-stock toolchains
79+
/// where `VectorProtocol.VectorSpaceScalar` is an associated type and not a typealias
80+
/// declaration.
81+
typealias VectorSpaceScalar = Float
82+
}
83+
7784
/// A layer that sequentially composes 3 layers.
7885
public typealias Sequential3<L1: Module, L2: Layer, L3: Layer> = Sequential<L1, Sequential<L2, L3>>
7986
where

0 commit comments

Comments
 (0)