(
shape: Shape, dtype?: DataType, name?: string)
| 189 | * @return An all-ones Variable. |
| 190 | */ |
| 191 | export function onesVariable( |
| 192 | shape: Shape, dtype?: DataType, name?: string): LayerVariable { |
| 193 | // TODO(cais): Implement logic for dtype. |
| 194 | const allocated = tfc.ones(shape); |
| 195 | return new LayerVariable(allocated, dtype, name); |
| 196 | } |
| 197 | |
| 198 | /** |
| 199 | * Instantiates an all-ones tensor of the same shape as another tensor. |
no outgoing calls
no test coverage detected
searching dependent graphs…