示例#1
0
def parse_block_cfg(block_op, out_channels, stride=1, repeat=1, *args):
    assert all(isinstance(x, dict) for x in args), f"{args}"
    cfg = {"out_channels": out_channels, "stride": stride}
    [hp.update_dict(cfg, x) for x in args]

    ret = {"block_op": block_op, "block_cfg": cfg, "repeat": repeat}

    return ret
示例#2
0
 def add_basic_args(self, **kwargs):
     """ args that will be passed to all primitives, they could be
           overrided by primitive parameters
     """
     hp.update_dict(self.basic_args, kwargs)