context.setEffDimFlagInputDimension(0, 0b1001);
context.setDynDimFlagInputDimension(0, 0b1000);
- bool is_nchw = (getTensorType() == Tformat::NCHW) ? true : false;
+ bool is_nchw = (getTensorType() == Tformat::NCHW);
/** set output dimensions */
auto const &in_dim = context.getInputDimensions()[0];
output_dims[0] = in_dim;
ret_dims[i].setTensorDim(axis, sizes[i]);
}
- bool is_format_nchw = (dim.getFormat() == Tformat::NCHW) ? true : false;
+ bool is_format_nchw = (dim.getFormat() == Tformat::NCHW);
auto iter_value = [this, is_format_nchw](
std::array<size_t, 4> &loc,
<< "given tensor vector is empty";
auto ref_dim = tensors.front().getDim();
- bool is_format_nchw = (ref_dim.getFormat() == Tformat::NCHW) ? true : false;
+ bool is_format_nchw = (ref_dim.getFormat() == Tformat::NCHW);
ref_dim.setTensorDim(axis, 1);
NNTR_THROW_IF(!std::all_of(tensors.begin(), tensors.end(),
[&ref_dim, axis](const Tensor &t) {
SL = dim.batch(), SI = dim.channel(), SJ = dim.height(), SK = dim.width();
- bool is_format_nchw = (getFormat() == Tformat::NCHW) ? true : false;
+ bool is_format_nchw = (getFormat() == Tformat::NCHW);
inptr = getData();
outptr = out.getData();