SwiftstructNeuralNetworks
struct NeuralNetworks.Function
Structure
What a query’s scopes step through. Every node here can be matched — see the syntax.
inherits{}
- protocolSwift.CustomReflectable
- protocolSwift.CustomStringConvertible
Members 21
- func
static load(from: Foundation.URL, options: NeuralNetworks.CompilationOptions) throws -> (function: NeuralNetworks.Function<[String : NeuralNetworks.Tensor], [String : NeuralNetworks.Tensor]>, parameters: [String : NeuralNetworks.Tensor], states: [String : NeuralNetworks.Tensor]) - field
var backwardPass: NeuralNetworks.Function<A, B>.ComputePass?+0x8 - field
var forwardPass: NeuralNetworks.Function<A, B>.ComputePass+0x0 - field
let inputParser: NeuralNetworks.FunctionInputParser<A>+0x10 - field
let outputParser: NeuralNetworks.FunctionOutputParser<B>+0x18 - func
callAsFunction(_: A, parameters: [String : NeuralNetworks.Tensor], states: inout [String : NeuralNetworks.Tensor]) -> B - func
callAsFunction(_: A, parameters: [String : NeuralNetworks.Tensor]) -> B - func
NeuralNetworks.Function< where B: Collection, B.Element == NeuralNetworks.Tensor>.tensorProperties(forOutputAt: Int) -> (shape: NeuralNetworks.TensorShape, scalarType: NeuralNetworks.TensorScalar.Type) - func
NeuralNetworks.Function< where B: Collection, B: ExpressibleByDictionaryLiteral, B.Sequence.Element == (key: B.ExpressibleByDictionaryLiteral.Key, value: NeuralNetworks.Tensor), B.ExpressibleByDictionaryLiteral.Key: CustomStringConvertible, B.ExpressibleByDictionaryLiteral.Value == NeuralNetworks.Tensor>.tensorProperties(forOutputAt: Int) -> (shape: NeuralNetworks.TensorShape, scalarType: NeuralNetworks.TensorScalar.Type) - func
NeuralNetworks.Function< where B: Collection, B: ExpressibleByDictionaryLiteral, B.Sequence.Element == (key: B.ExpressibleByDictionaryLiteral.Key, value: NeuralNetworks.Tensor), B.ExpressibleByDictionaryLiteral.Key: CustomStringConvertible, B.ExpressibleByDictionaryLiteral.Value == NeuralNetworks.Tensor>.tensorProperties(forOutputNamed: String) -> (shape: NeuralNetworks.TensorShape, scalarType: NeuralNetworks.TensorScalar.Type)? - func
NeuralNetworks.Function< where A: Collection, A.Element == NeuralNetworks.Tensor>.tensorProperties(forInputAt: Int) -> (shape: NeuralNetworks.TensorShape, scalarType: NeuralNetworks.TensorScalar.Type) - func
NeuralNetworks.Function< where A: Collection, A: ExpressibleByDictionaryLiteral, A.Sequence.Element == (key: A.ExpressibleByDictionaryLiteral.Key, value: NeuralNetworks.Tensor), A.ExpressibleByDictionaryLiteral.Key: CustomStringConvertible, A.ExpressibleByDictionaryLiteral.Value == NeuralNetworks.Tensor>.tensorProperties(forInputAt: Int) -> (shape: NeuralNetworks.TensorShape, scalarType: NeuralNetworks.TensorScalar.Type) - func
NeuralNetworks.Function< where A: Collection, A: ExpressibleByDictionaryLiteral, A.Sequence.Element == (key: A.ExpressibleByDictionaryLiteral.Key, value: NeuralNetworks.Tensor), A.ExpressibleByDictionaryLiteral.Key: CustomStringConvertible, A.ExpressibleByDictionaryLiteral.Value == NeuralNetworks.Tensor>.tensorProperties(forInputNamed: String) -> (shape: NeuralNetworks.TensorShape, scalarType: NeuralNetworks.TensorScalar.Type)? - var
var customMirror: Mirror { get } - var
var description: String { get } - var
var inputCount: Int { get } - var
var inputNames: [String] { get } - var
var inputTensorProperties: (shape: NeuralNetworks.TensorShape, scalarType: NeuralNetworks.TensorScalar.Type) { get } - var
var outputCount: Int { get } - var
var outputNames: [String] { get } - var
var outputTensorProperties: (shape: NeuralNetworks.TensorShape, scalarType: NeuralNetworks.TensorScalar.Type) { get }
Header
struct Function<A, B> { class ComputePass { let inputMappings: [NeuralNetworks.Function<A, B>.IOMapping] let outputMappings: [NeuralNetworks.Function<A, B>.IOMapping] var computeDevice: NeuralNetworks.ComputeDevice let function: NeuralNetworks.LazyTensorFunction var _executor: (any NeuralNetworks.LazyTensorFunctionExecutor)? } class Operation { let id: NeuralNetworks.TensorOperationID let backward: (([NeuralNetworks.OutputGradient], [NeuralNetworks.Tensor]) -> [NeuralNetworks.InputGradient])? let creationSite: NeuralNetworks.SourceLocation? var inputs: [NeuralNetworks.TensorRepresentation] var differentiableOperands: [NeuralNetworks.TensorRepresentation] let outputs: [NeuralNetworks.TensorRepresentation] } struct IOMapping { enum Kind { case input case parameter case state case output } let kind: NeuralNetworks.Function<A, B>.IOMapping.Kind let userKey: Swift.String let functionKey: Swift.String let functionIndex: Swift.Int } struct CompilationError { let description: Swift.String } var forwardPass: NeuralNetworks.Function<A, B>.ComputePass var backwardPass: NeuralNetworks.Function<A, B>.ComputePass? let inputParser: NeuralNetworks.FunctionInputParser<A> let outputParser: NeuralNetworks.FunctionOutputParser<B> var customMirror: Swift.Mirror { get } var description: Swift.String { get } func callAsFunction(_: A, parameters: [Swift.String : NeuralNetworks.Tensor], states: inout [Swift.String : NeuralNetworks.Tensor]) -> B func callAsFunction(_: A, parameters: [Swift.String : NeuralNetworks.Tensor]) -> B static func load(from: Foundation.URL, options: NeuralNetworks.CompilationOptions) throws -> (function: NeuralNetworks.Function<[Swift.String : NeuralNetworks.Tensor], [Swift.String : NeuralNetworks.Tensor]>, parameters: [Swift.String : NeuralNetworks.Tensor], states: [Swift.String : NeuralNetworks.Tensor]) }