Model
public protocol Model: Graph
This protocol defines higher-level APIs for creating, training and prediction of a model.
-
Operator symbols of this model
Declaration
Swift
var operators: [OperatorSymbol]
-
List of input tensor symbols
Declaration
Swift
var inputs: [TensorSymbol]
-
List of output tensor symbol
Declaration
Swift
var outputs: [TensorSymbol]
-
Add an input entry for moedel
inputShape
inputShape
indicates the shape of a sample without batch index. For example if we have some 128x128 RGB picture as input, theinputShape
should beTensorShape
object withshapeArray
:[128, 128, 3]
ifchannelOrder
is ‘TensorChannelOrder.last’Declaration
Swift
func addInput(inputShape: TensorShape, channelOrder: TensorChannelOrder) -> TensorSymbol
Parameters
inputShape
input shape of sample. Not include batch index.
Return Value
tensor symbol representation
-
Add layer to the model.
Declaration
Swift
func addLayer(_ inputs: [TensorSymbol], op: ComputableOperator) -> [TensorSymbol]
Parameters
inputs
list of input tensor symbols to this layer
op
operator
Return Value
list of output tensor symbols from this layer
-
Undocumented
Declaration
Swift
func configure()