Shape构造函数。
下文中的dim_num_为维度个数,即有几维;dims_为具体的维度值信息。
1 | Shape() : dim_num_(0), dims_{0} |
1 | Shape(const std::initializer_list<int64_t> &args) : Shape() |
1 | Shape(const Shape &other) |
1 | Shape &operator=(const Shape &other) |
参数 |
输入/输出 |
说明 |
|---|---|---|
args |
输入 |
shape的所有dim值。 |
other |
输入 |
源Shape对象。 |
生成一个初始化的Shape对象。
无。
1 | Shape shape({3, 256, 256}); // dim_num_=3 dims_的前三维的维度为3,256,256 |