SetShape
Applicability
Product |
Supported or Not |
|---|---|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
Header File/Library File
- Header file: #include <ge/es_tensor_holder.h>
- Library files: libeager_style_graph_builder_base.so and libeager_style_graph_builder_base_static.a
Function Usage
Sets the shape of a TensorHolder.
Prototype
1 | EsTensorHolder &SetShape(const std::vector<int64_t> &dims) |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
dims |
Input |
Tensor dimension vector. |
Returns
Parameter |
Type |
Description |
|---|---|---|
- |
EsTensorHolder & |
Reference to the current object, which supports chain calls. |
Constraints
None
Examples
1 2 3 4 | //1. Create a graph builder (EsGraphBuilder). EsGraphBuilder builder("graph_name"); // 2. Add an input node. EsTensorHolder data0 = builder.CreateInput(0).SetShape({1, 3, 224, 224}); // Sets the shape of the output tensor of the input node. |
Parent topic: EsTensorHolder