Method ConstantOfShape
ConstantOfShape(TensorShape, float)
Generates a tensor with a given shape filled with a given value.
Declaration
public TensorFloat ConstantOfShape(TensorShape X, float value)
Parameters
| Type | Name | Description |
|---|---|---|
| TensorShape | X | The input tensor shape. |
| float | value | The fill value. |
Returns
| Type | Description |
|---|---|
| TensorFloat | The computed output tensor. |
ConstantOfShape(TensorShape, int)
Generates a tensor with a given shape filled with a given value.
Declaration
public TensorInt ConstantOfShape(TensorShape X, int value)
Parameters
| Type | Name | Description |
|---|---|---|
| TensorShape | X | The input tensor shape. |
| int | value | The fill value. |
Returns
| Type | Description |
|---|---|
| TensorInt | The computed output tensor. |