LayerBuilder
@_functionBuilder
public enum LayerBuilder
A layer builder can be used to create sequences of layers
-
Creates a sequential layer by concatenating the forward functions of the given layers.
Declaration
Swift
static func buildBlock<A, B>(_ a: A, _ b: B) -> Sequential<A, B> where A.Outputs == B.Inputs, A.Parameter == B.Parameter, A.Device == B.Device
-
Creates a sequential layer by concatenating the forward functions of the given layers.
Declaration
Swift
static func buildBlock<A, B, C>(_ a: A, _ b: B, _ c: C) -> Sequential<Sequential<A, B>, C> where A : LayerType, B : LayerType, C : LayerType, A.Device == B.Device, A.Outputs == B.Inputs, A.Parameter == B.Parameter, B.Device == C.Device, B.Outputs == C.Inputs, B.Parameter == C.Parameter
-
Creates a sequential layer by concatenating the forward functions of the given layers.
Declaration
Swift
static func buildBlock<A, B, C, D>(_ a: A, _ b: B, _ c: C, _ d: D) -> Sequential<Sequential<A, B>, Sequential<C, D>> where A : LayerType, B : LayerType, C : LayerType, D : LayerType, A.Device == B.Device, A.Outputs == B.Inputs, A.Parameter == B.Parameter, B.Device == C.Device, B.Outputs == C.Inputs, B.Parameter == C.Parameter, C.Device == D.Device, C.Outputs == D.Inputs, C.Parameter == D.Parameter
-
Creates a sequential layer by concatenating the forward functions of the given layers.
Declaration
Swift
static func buildBlock<A, B, C, D, E>(_ a: A, _ b: B, _ c: C, _ d: D, _ e: E) -> Sequential<Sequential<Sequential<A, B>, C>, Sequential<D, E>> where A : LayerType, B : LayerType, C : LayerType, D : LayerType, E : LayerType, A.Device == B.Device, A.Outputs == B.Inputs, A.Parameter == B.Parameter, B.Device == C.Device, B.Outputs == C.Inputs, B.Parameter == C.Parameter, C.Device == D.Device, C.Outputs == D.Inputs, C.Parameter == D.Parameter, D.Device == E.Device, D.Outputs == E.Inputs, D.Parameter == E.Parameter
-
Creates a sequential layer by concatenating the forward functions of the given layers.
Declaration
Swift
static func buildBlock<A, B, C, D, E, F>(_ a: A, _ b: B, _ c: C, _ d: D, _ e: E, _ f: F) -> Sequential<Sequential<Sequential<A, B>, Sequential<C, D>>, Sequential<E, F>> where A : LayerType, B : LayerType, C : LayerType, D : LayerType, E : LayerType, F : LayerType, A.Device == B.Device, A.Outputs == B.Inputs, A.Parameter == B.Parameter, B.Device == C.Device, B.Outputs == C.Inputs, B.Parameter == C.Parameter, C.Device == D.Device, C.Outputs == D.Inputs, C.Parameter == D.Parameter, D.Device == E.Device, D.Outputs == E.Inputs, D.Parameter == E.Parameter, E.Device == F.Device, E.Outputs == F.Inputs, E.Parameter == F.Parameter
-
Creates a sequential layer by concatenating the forward functions of the given layers.
Declaration
Swift
static func buildBlock<A, B, C, D, E, F, G>(_ a: A, _ b: B, _ c: C, _ d: D, _ e: E, _ f: F, _ g: G) -> Sequential<Sequential<Sequential<A, B>, Sequential<C, D>>, Sequential<Sequential<E, F>, G>> where A : LayerType, B : LayerType, C : LayerType, D : LayerType, E : LayerType, F : LayerType, G : LayerType, A.Device == B.Device, A.Outputs == B.Inputs, A.Parameter == B.Parameter, B.Device == C.Device, B.Outputs == C.Inputs, B.Parameter == C.Parameter, C.Device == D.Device, C.Outputs == D.Inputs, C.Parameter == D.Parameter, D.Device == E.Device, D.Outputs == E.Inputs, D.Parameter == E.Parameter, E.Device == F.Device, E.Outputs == F.Inputs, E.Parameter == F.Parameter, F.Device == G.Device, F.Outputs == G.Inputs, F.Parameter == G.Parameter
-
Creates a sequential layer by concatenating the forward functions of the given layers.
Declaration
Swift
static func buildBlock<A, B, C, D, E, F, G, H>(_ a: A, _ b: B, _ c: C, _ d: D, _ e: E, _ f: F, _ g: G, _ h: H) -> Sequential<Sequential<Sequential<A, B>, Sequential<C, D>>, Sequential<Sequential<E, F>, Sequential<G, H>>> where A : LayerType, B : LayerType, C : LayerType, D : LayerType, E : LayerType, F : LayerType, G : LayerType, H : LayerType, A.Device == B.Device, A.Outputs == B.Inputs, A.Parameter == B.Parameter, B.Device == C.Device, B.Outputs == C.Inputs, B.Parameter == C.Parameter, C.Device == D.Device, C.Outputs == D.Inputs, C.Parameter == D.Parameter, D.Device == E.Device, D.Outputs == E.Inputs, D.Parameter == E.Parameter, E.Device == F.Device, E.Outputs == F.Inputs, E.Parameter == F.Parameter, F.Device == G.Device, F.Outputs == G.Inputs, F.Parameter == G.Parameter, G.Device == H.Device, G.Outputs == H.Inputs, G.Parameter == H.Parameter
-
Creates a sequential layer by concatenating the forward functions of the given layers.
Declaration
Swift
static func buildBlock<A, B, C, D, E, F, G, H, I>(_ a: A, _ b: B, _ c: C, _ d: D, _ e: E, _ f: F, _ g: G, _ h: H, _ i: I) -> Sequential<Sequential<Sequential<Sequential<A, B>, Sequential<C, D>>, Sequential<Sequential<E, F>, Sequential<G, H>>>, I> where A : LayerType, B : LayerType, C : LayerType, D : LayerType, E : LayerType, F : LayerType, G : LayerType, H : LayerType, I : LayerType, A.Device == B.Device, A.Outputs == B.Inputs, A.Parameter == B.Parameter, B.Device == C.Device, B.Outputs == C.Inputs, B.Parameter == C.Parameter, C.Device == D.Device, C.Outputs == D.Inputs, C.Parameter == D.Parameter, D.Device == E.Device, D.Outputs == E.Inputs, D.Parameter == E.Parameter, E.Device == F.Device, E.Outputs == F.Inputs, E.Parameter == F.Parameter, F.Device == G.Device, F.Outputs == G.Inputs, F.Parameter == G.Parameter, G.Device == H.Device, G.Outputs == H.Inputs, G.Parameter == H.Parameter, H.Device == I.Device, H.Outputs == I.Inputs, H.Parameter == I.Parameter
-
Creates a sequential layer by concatenating the forward functions of the given layers.
Declaration
Swift
static func buildBlock<A, B, C, D, E, F, G, H, I, J>(_ a: A, _ b: B, _ c: C, _ d: D, _ e: E, _ f: F, _ g: G, _ h: H, _ i: I, _ j: J) -> Sequential<Sequential<Sequential<Sequential<A, B>, Sequential<C, D>>, Sequential<Sequential<E, F>, Sequential<G, H>>>, Sequential<I, J>> where A : LayerType, B : LayerType, C : LayerType, D : LayerType, E : LayerType, F : LayerType, G : LayerType, H : LayerType, I : LayerType, J : LayerType, A.Device == B.Device, A.Outputs == B.Inputs, A.Parameter == B.Parameter, B.Device == C.Device, B.Outputs == C.Inputs, B.Parameter == C.Parameter, C.Device == D.Device, C.Outputs == D.Inputs, C.Parameter == D.Parameter, D.Device == E.Device, D.Outputs == E.Inputs, D.Parameter == E.Parameter, E.Device == F.Device, E.Outputs == F.Inputs, E.Parameter == F.Parameter, F.Device == G.Device, F.Outputs == G.Inputs, F.Parameter == G.Parameter, G.Device == H.Device, G.Outputs == H.Inputs, G.Parameter == H.Parameter, H.Device == I.Device, H.Outputs == I.Inputs, H.Parameter == I.Parameter, I.Device == J.Device, I.Outputs == J.Inputs, I.Parameter == J.Parameter
-
Creates a sequential layer by concatenating the forward functions of the given layers.
Declaration
Swift
static func buildBlock<A, B, C, D, E, F, G, H, I, J, K>(_ a: A, _ b: B, _ c: C, _ d: D, _ e: E, _ f: F, _ g: G, _ h: H, _ i: I, _ j: J, _ k: K) -> Sequential<Sequential<Sequential<Sequential<A, B>, Sequential<C, D>>, Sequential<Sequential<E, F>, Sequential<G, H>>>, Sequential<Sequential<I, J>, K>> where A : LayerType, B : LayerType, C : LayerType, D : LayerType, E : LayerType, F : LayerType, G : LayerType, H : LayerType, I : LayerType, J : LayerType, K : LayerType, A.Device == B.Device, A.Outputs == B.Inputs, A.Parameter == B.Parameter, B.Device == C.Device, B.Outputs == C.Inputs, B.Parameter == C.Parameter, C.Device == D.Device, C.Outputs == D.Inputs, C.Parameter == D.Parameter, D.Device == E.Device, D.Outputs == E.Inputs, D.Parameter == E.Parameter, E.Device == F.Device, E.Outputs == F.Inputs, E.Parameter == F.Parameter, F.Device == G.Device, F.Outputs == G.Inputs, F.Parameter == G.Parameter, G.Device == H.Device, G.Outputs == H.Inputs, G.Parameter == H.Parameter, H.Device == I.Device, H.Outputs == I.Inputs, H.Parameter == I.Parameter, I.Device == J.Device, I.Outputs == J.Inputs, I.Parameter == J.Parameter, J.Device == K.Device, J.Outputs == K.Inputs, J.Parameter == K.Parameter
-
Creates a sequential layer by concatenating the forward functions of the given layers.
Declaration
Swift
static func buildBlock<A, B, C, D, E, F, G, H, I, J, K, L>(_ a: A, _ b: B, _ c: C, _ d: D, _ e: E, _ f: F, _ g: G, _ h: H, _ i: I, _ j: J, _ k: K, _ l: L) -> Sequential<Sequential<Sequential<Sequential<A, B>, Sequential<C, D>>, Sequential<Sequential<E, F>, Sequential<G, H>>>, Sequential<Sequential<I, J>, Sequential<K, L>>> where A : LayerType, B : LayerType, C : LayerType, D : LayerType, E : LayerType, F : LayerType, G : LayerType, H : LayerType, I : LayerType, J : LayerType, K : LayerType, L : LayerType, A.Device == B.Device, A.Outputs == B.Inputs, A.Parameter == B.Parameter, B.Device == C.Device, B.Outputs == C.Inputs, B.Parameter == C.Parameter, C.Device == D.Device, C.Outputs == D.Inputs, C.Parameter == D.Parameter, D.Device == E.Device, D.Outputs == E.Inputs, D.Parameter == E.Parameter, E.Device == F.Device, E.Outputs == F.Inputs, E.Parameter == F.Parameter, F.Device == G.Device, F.Outputs == G.Inputs, F.Parameter == G.Parameter, G.Device == H.Device, G.Outputs == H.Inputs, G.Parameter == H.Parameter, H.Device == I.Device, H.Outputs == I.Inputs, H.Parameter == I.Parameter, I.Device == J.Device, I.Outputs == J.Inputs, I.Parameter == J.Parameter, J.Device == K.Device, J.Outputs == K.Inputs, J.Parameter == K.Parameter, K.Device == L.Device, K.Outputs == L.Inputs, K.Parameter == L.Parameter
-
Creates a sequential layer by concatenating the forward functions of the given layers.
Declaration
Swift
static func buildBlock<A, B, C, D, E, F, G, H, I, J, K, L, M>(_ a: A, _ b: B, _ c: C, _ d: D, _ e: E, _ f: F, _ g: G, _ h: H, _ i: I, _ j: J, _ k: K, _ l: L, _ m: M) -> Sequential<Sequential<Sequential<Sequential<A, B>, Sequential<C, D>>, Sequential<Sequential<E, F>, Sequential<G, H>>>, Sequential<Sequential<Sequential<I, J>, K>, Sequential<L, M>>> where A : LayerType, B : LayerType, C : LayerType, D : LayerType, E : LayerType, F : LayerType, G : LayerType, H : LayerType, I : LayerType, J : LayerType, K : LayerType, L : LayerType, M : LayerType, A.Device == B.Device, A.Outputs == B.Inputs, A.Parameter == B.Parameter, B.Device == C.Device, B.Outputs == C.Inputs, B.Parameter == C.Parameter, C.Device == D.Device, C.Outputs == D.Inputs, C.Parameter == D.Parameter, D.Device == E.Device, D.Outputs == E.Inputs, D.Parameter == E.Parameter, E.Device == F.Device, E.Outputs == F.Inputs, E.Parameter == F.Parameter, F.Device == G.Device, F.Outputs == G.Inputs, F.Parameter == G.Parameter, G.Device == H.Device, G.Outputs == H.Inputs, G.Parameter == H.Parameter, H.Device == I.Device, H.Outputs == I.Inputs, H.Parameter == I.Parameter, I.Device == J.Device, I.Outputs == J.Inputs, I.Parameter == J.Parameter, J.Device == K.Device, J.Outputs == K.Inputs, J.Parameter == K.Parameter, K.Device == L.Device, K.Outputs == L.Inputs, K.Parameter == L.Parameter, L.Device == M.Device, L.Outputs == M.Inputs, L.Parameter == M.Parameter
-
Creates a sequential layer by concatenating the forward functions of the given layers.
Declaration
Swift
static func buildBlock<A, B, C, D, E, F, G, H, I, J, K, L, M, N>(_ a: A, _ b: B, _ c: C, _ d: D, _ e: E, _ f: F, _ g: G, _ h: H, _ i: I, _ j: J, _ k: K, _ l: L, _ m: M, _ n: N) -> Sequential<Sequential<Sequential<Sequential<A, B>, Sequential<C, D>>, Sequential<Sequential<E, F>, Sequential<G, H>>>, Sequential<Sequential<Sequential<I, J>, Sequential<K, L>>, Sequential<M, N>>> where A : LayerType, B : LayerType, C : LayerType, D : LayerType, E : LayerType, F : LayerType, G : LayerType, H : LayerType, I : LayerType, J : LayerType, K : LayerType, L : LayerType, M : LayerType, N : LayerType, A.Device == B.Device, A.Outputs == B.Inputs, A.Parameter == B.Parameter, B.Device == C.Device, B.Outputs == C.Inputs, B.Parameter == C.Parameter, C.Device == D.Device, C.Outputs == D.Inputs, C.Parameter == D.Parameter, D.Device == E.Device, D.Outputs == E.Inputs, D.Parameter == E.Parameter, E.Device == F.Device, E.Outputs == F.Inputs, E.Parameter == F.Parameter, F.Device == G.Device, F.Outputs == G.Inputs, F.Parameter == G.Parameter, G.Device == H.Device, G.Outputs == H.Inputs, G.Parameter == H.Parameter, H.Device == I.Device, H.Outputs == I.Inputs, H.Parameter == I.Parameter, I.Device == J.Device, I.Outputs == J.Inputs, I.Parameter == J.Parameter, J.Device == K.Device, J.Outputs == K.Inputs, J.Parameter == K.Parameter, K.Device == L.Device, K.Outputs == L.Inputs, K.Parameter == L.Parameter, L.Device == M.Device, L.Outputs == M.Inputs, L.Parameter == M.Parameter, M.Device == N.Device, M.Outputs == N.Inputs, M.Parameter == N.Parameter
-
Creates a sequential layer by concatenating the forward functions of the given layers.
Declaration
Swift
static func buildBlock<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O>(_ a: A, _ b: B, _ c: C, _ d: D, _ e: E, _ f: F, _ g: G, _ h: H, _ i: I, _ j: J, _ k: K, _ l: L, _ m: M, _ n: N, _ o: O) -> Sequential<Sequential<Sequential<Sequential<A, B>, Sequential<C, D>>, Sequential<Sequential<E, F>, Sequential<G, H>>>, Sequential<Sequential<Sequential<I, J>, Sequential<K, L>>, Sequential<Sequential<M, N>, O>>> where A : LayerType, B : LayerType, C : LayerType, D : LayerType, E : LayerType, F : LayerType, G : LayerType, H : LayerType, I : LayerType, J : LayerType, K : LayerType, L : LayerType, M : LayerType, N : LayerType, O : LayerType, A.Device == B.Device, A.Outputs == B.Inputs, A.Parameter == B.Parameter, B.Device == C.Device, B.Outputs == C.Inputs, B.Parameter == C.Parameter, C.Device == D.Device, C.Outputs == D.Inputs, C.Parameter == D.Parameter, D.Device == E.Device, D.Outputs == E.Inputs, D.Parameter == E.Parameter, E.Device == F.Device, E.Outputs == F.Inputs, E.Parameter == F.Parameter, F.Device == G.Device, F.Outputs == G.Inputs, F.Parameter == G.Parameter, G.Device == H.Device, G.Outputs == H.Inputs, G.Parameter == H.Parameter, H.Device == I.Device, H.Outputs == I.Inputs, H.Parameter == I.Parameter, I.Device == J.Device, I.Outputs == J.Inputs, I.Parameter == J.Parameter, J.Device == K.Device, J.Outputs == K.Inputs, J.Parameter == K.Parameter, K.Device == L.Device, K.Outputs == L.Inputs, K.Parameter == L.Parameter, L.Device == M.Device, L.Outputs == M.Inputs, L.Parameter == M.Parameter, M.Device == N.Device, M.Outputs == N.Inputs, M.Parameter == N.Parameter, N.Device == O.Device, N.Outputs == O.Inputs, N.Parameter == O.Parameter
-
Creates a sequential layer by concatenating the forward functions of the given layers.
Declaration
Swift
static func buildBlock<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P>(_ a: A, _ b: B, _ c: C, _ d: D, _ e: E, _ f: F, _ g: G, _ h: H, _ i: I, _ j: J, _ k: K, _ l: L, _ m: M, _ n: N, _ o: O, _ p: P) -> Sequential<Sequential<Sequential<Sequential<A, B>, Sequential<C, D>>, Sequential<Sequential<E, F>, Sequential<G, H>>>, Sequential<Sequential<Sequential<I, J>, Sequential<K, L>>, Sequential<Sequential<M, N>, Sequential<O, P>>>> where A : LayerType, B : LayerType, C : LayerType, D : LayerType, E : LayerType, F : LayerType, G : LayerType, H : LayerType, I : LayerType, J : LayerType, K : LayerType, L : LayerType, M : LayerType, N : LayerType, O : LayerType, P : LayerType, A.Device == B.Device, A.Outputs == B.Inputs, A.Parameter == B.Parameter, B.Device == C.Device, B.Outputs == C.Inputs, B.Parameter == C.Parameter, C.Device == D.Device, C.Outputs == D.Inputs, C.Parameter == D.Parameter, D.Device == E.Device, D.Outputs == E.Inputs, D.Parameter == E.Parameter, E.Device == F.Device, E.Outputs == F.Inputs, E.Parameter == F.Parameter, F.Device == G.Device, F.Outputs == G.Inputs, F.Parameter == G.Parameter, G.Device == H.Device, G.Outputs == H.Inputs, G.Parameter == H.Parameter, H.Device == I.Device, H.Outputs == I.Inputs, H.Parameter == I.Parameter, I.Device == J.Device, I.Outputs == J.Inputs, I.Parameter == J.Parameter, J.Device == K.Device, J.Outputs == K.Inputs, J.Parameter == K.Parameter, K.Device == L.Device, K.Outputs == L.Inputs, K.Parameter == L.Parameter, L.Device == M.Device, L.Outputs == M.Inputs, L.Parameter == M.Parameter, M.Device == N.Device, M.Outputs == N.Inputs, M.Parameter == N.Parameter, N.Device == O.Device, N.Outputs == O.Inputs, N.Parameter == O.Parameter, O.Device == P.Device, O.Outputs == P.Inputs, O.Parameter == P.Parameter