class nbla::Shape
-
template<typename T>
class Shape : public nbla::BaseFunction<int, int> Shape Get the shape of specified tensor.
Inputs:
N-D array.
Outputs:
1-D array.
- Template Parameters:
T – Data type for computation.
- Param start:
The start index of slice of shape array. If start axis is omit, the slice starts from 0.
- Param end:
The end index of slice of shape array. If the end axis is omitted, the axes upto the last one will be included.
Public Functions
-
inline virtual shared_ptr<Function> copy() const
Copy another instance of Function with the same context.
-
inline virtual int min_inputs()
Get minimum number of inputs.
This is meant to be used in setup function with in_types which is used to get maximum number of inputs.
-
inline virtual int min_outputs()
Get minimum number of outputs.
This is meant to be used in setup function with out_types which is used to get max number of outputs.
-
inline virtual vector<dtypes> in_types()
Get input dtypes.
Last in_type will be used repeatedly if size of in_types is smaller than size of inputs
-
inline virtual vector<dtypes> out_types()
Get output dtypes.
Last out_type will be used repeatedly if size of out_types is smaller than size of outputs
-
inline virtual vector<string> allowed_array_classes()
Get array classes that are allowed to be specified by Context.
-
inline virtual string name()
Get function name in string.