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

Commit

Permalink
Add explicit Sequential.TangentVector.VectorSpaceScalar typealias.
Browse files Browse the repository at this point in the history
  • Loading branch information
dan-zheng committed Jan 6, 2021
1 parent c73af66 commit 727c600
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Sources/TensorFlow/Layers/Sequential.swift
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,13 @@ extension Sequential: Layer where Layer1: Layer {
}
}

extension Sequential.TangentVector {
/// - Note: this typealias declaration is necessary for building with old non-stock toolchains
/// where `VectorProtocol.VectorSpaceScalar` is an associated type and not a typealias
/// declaration.
typealias VectorSpaceScalar = Float
}

/// A layer that sequentially composes 3 layers.
public typealias Sequential3<L1: Module, L2: Layer, L3: Layer> = Sequential<L1, Sequential<L2, L3>>
where
Expand Down

0 comments on commit 727c600

Please sign in to comment.