basecls.models.hrnet#
HRNet Series
HRNet: “Deep High-Resolution Representation Learning for Visual Recognition”
引用
HRNet/HRNet-Image-Classification
- class basecls.models.hrnet.UpsampleNearest(scale_factor)[源代码]#
基类:
ModuleNearest upsample block
- 参数
scale_factor (
int) – Upsample scale factor.
- class basecls.models.hrnet.HRFusion(channels, multi_scale_output, norm_name, act_name)[源代码]#
基类:
ModuleHRNet fusion block.
- 参数
- class basecls.models.hrnet.HRModule(block_name, num_blocks, in_channels, channels, multi_scale_output, norm_name, act_name)[源代码]#
基类:
ModuleHRNet module.
- class basecls.models.hrnet.HRTrans(in_chs, out_chs, norm_name, act_name)[源代码]#
基类:
ModuleHRNet transition block.
- 参数
- class basecls.models.hrnet.HRStage(num_modules, num_blocks, block_name, pre_channels, cur_channels, multi_scale_output, w_fst, norm_name, act_name)[源代码]#
基类:
ModuleHRNet stage.
- 参数
num_modules (
int) – Number of modules.block_name (
str) – Branch block type.pre_channels (
List[int]) – Channels of previous stage (an empty list for the first stage).multi_scale_output (
bool) – Whether output multi-scale features.w_fst (
Optional[int]) – Width of stem for the first stage (Nonefor other stages).norm_name (
str) – Normalization layer.act_name (
str) – Activation function.
- class basecls.models.hrnet.HRMerge(block_name, pre_channels, channels, norm_name, act_name)[源代码]#
基类:
ModuleHRNet merge block.
- 参数
- class basecls.models.hrnet.HRNet(stage_modules, stage_blocks, stage_block_names, stage_channels, w_stem=64, multi_scale_output=True, merge_block_name='bottleneck', merge_channels=[32, 64, 128, 256], norm_name='BN', act_name='relu', head=None, **kwargs)[源代码]#
基类:
ModuleHRNet model.
- 参数
stage_modules (
List[int]) – Number of modules for each stage.stage_blocks (
List[List[int]]) – Number of blocks for each module in stages.stage_block_names (
List[str]) – Branch block types for each stage.stage_channels (
List[List[int]]) – Number of channels for each stage.w_stem (
int) – Stem width. Default:64multi_scale_output (
bool) – Whether output multi-scale features. Default:Truemerge_block_name (
str) – Merge block type. Default:"bottleneck"merge_channels (
List[int]) – Channels of each scale in merge block. Default:[32, 64, 128, 256]norm_name (
str) – Normalization layer. Default:"BN"act_name (
str) – Activation function. Default:"relu"head (
Optional[Mapping[str,Any]]) – head args. Default:None