init(graphObjects:lossLayer:optimizer:)
Creates a training graph with the layers from the graph objects, loss layer, and optimizer you specify.
Declaration
convenience init(graphObjects: [MLCGraph], lossLayer: MLCLayer?, optimizer: MLCOptimizer?)Parameters
- graphObjects:
The graph objects whose layers you add to the training graph.
- lossLayer:
The loss layer.
- optimizer:
The optimizer.
Discussion
You can also add a loss layer to a training graph using the node(with:sources:lossLabels:) method.