In faster-rcnn c++ code which was generated from the .proto file (google protobuf) using protoc, I see this line and can't understand it. caffe-fast-rcnn/.build_release/src/caffe/proto/caffe.pb.cc
void NetParameter::MergeFrom(const NetParameter& from) {
GOOGLE_CHECK_NE(&from, this);
input_.MergeFrom(from.input_);
input_shape_.MergeFrom(from.input_shape_);
input_dim_.MergeFrom(from.input_dim_);
layer_.MergeFrom(from.layer_);
layers_.MergeFrom(from.layers_);
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (from.has_name()) {
set_name(from.name());
}
if (from.has_force_backward()) {
set_force_backward(from.force_backward());
}
if (from.has_state()) {
mutable_state()->::caffe::NetState::MergeFrom(from.state());
}
if (from.has_debug_info()) {
set_debug_info(from.debug_info());
}
}
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
it's for merging (overwrite singular values and add to arrays) network parameters from 'from' to 'to'. The question I have here is this expression :
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32)))
why use 0/32 as index which is just 0? and why use 0 % 32 which is also 0?
0
– t.niese