本文整理汇总了C++中BlobShape::dim_size方法的典型用法代码示例。如果您正苦于以下问题:C++ BlobShape::dim_size方法的具体用法?C++ BlobShape::dim_size怎么用?C++ BlobShape::dim_size使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BlobShape
的用法示例。
在下文中一共展示了BlobShape::dim_size方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Reshape
void Blob<Dtype>::Reshape(const BlobShape& shape) {
CHECK_LE(shape.dim_size(), kMaxBlobAxes);
vector<int> shape_vec(shape.dim_size());
for (int i = 0; i < shape.dim_size(); ++i) {
shape_vec[i] = shape.dim(i);
}
Reshape(shape_vec);
}
示例2:
const vector<int> NDimDataLayer<Dtype>::blob2vec(const BlobShape& b) const
{
CHECK_LE(b.dim_size(), kMaxBlobAxes);
vector<int> shape_vec(b.dim_size());
for (int i = 0, n = b.dim_size(); i < n; ++i) {
shape_vec[i] = b.dim(i);
}
return shape_vec;
}
示例3: shape
void Blob<Dtype>::reshape(const BlobShape& blob_shape) {
vector<int> shape(blob_shape.dim_size());
for (int i = 0; i < shape.size(); i++) shape[i] = blob_shape.dim(i);
reshape(shape);
}