Contents

variableFromTensor(_:name:)

Creates a variable from an input tensor.

Declaration

func variableFromTensor(_ tensor: MPSGraphTensor, name: String?) -> MPSGraphTensor

Parameters

  • tensor:

    The tensor from which to form the variable.

  • name:

    The name for the operation.

Return Value

A valid MPSGraphTensor object.