MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / Size

Function Size

tensorflow/go/op/wrappers.go:1824–1841  ·  view source on GitHub ↗

Returns the size of a tensor. This operation returns an integer representing the number of elements in `input`. For example: ``` # 't' is [[[1, 1,, 1], [2, 2, 2]], [[3, 3, 3], [4, 4, 4]]]] size(t) ==> 12 ```

(scope *Scope, input tf.Output, optional ...SizeAttr)

Source from the content-addressed store, hash-verified

1822// size(t) ==> 12
1823// ```
1824func Size(scope *Scope, input tf.Output, optional ...SizeAttr) (output tf.Output) {
1825 if scope.Err() != nil {
1826 return
1827 }
1828 attrs := map[string]interface{}{}
1829 for _, a := range optional {
1830 a(attrs)
1831 }
1832 opspec := tf.OpSpec{
1833 Type: "Size",
1834 Input: []tf.Input{
1835 input,
1836 },
1837 Attrs: attrs,
1838 }
1839 op := scope.AddOperation(opspec)
1840 return op.Output(0)
1841}
1842
1843// Returns the rank of a tensor.
1844//

Callers 13

TESTFunction · 0.50
TESTFunction · 0.50
DebugStringMethod · 0.50
DebugStringMethod · 0.50
TEST_FFunction · 0.50
TEST_FFunction · 0.50
TEST_FFunction · 0.50
TEST_FFunction · 0.50
TEST_FFunction · 0.50
TileGradFunction · 0.50
BatchGatherGradFunction · 0.50
GatherV2GradFunction · 0.50

Calls 4

aClass · 0.85
ErrMethod · 0.45
AddOperationMethod · 0.45
OutputMethod · 0.45

Tested by 7

TESTFunction · 0.40
TESTFunction · 0.40
TEST_FFunction · 0.40
TEST_FFunction · 0.40
TEST_FFunction · 0.40
TEST_FFunction · 0.40
TEST_FFunction · 0.40