gradientData(forParameter:layer:)
Gets the gradient data for the trainable parameter and associated layer you specify.
Declaration
func gradientData(forParameter parameter: MLCTensor, layer: MLCLayer) -> Data?Parameters
- parameter:
The trainable parameter you associated with the layer.
- layer:
A layer in the training graph.
Return Value
The gradient data, or nil.
Discussion
The layer must be an instance one of the following types: