INNER CODE UNIT · Python

set_model_arch

tensorlayer/HyperPose · hyperpose/Config/__init__.py:176

def set_model_arch(model_arch):
    '''set user defined model architecture

    replace default model architecture with user-defined model architecture, use it in the following training and evaluation 
    
    Parameters
    ----------
    arg1 : tensorlayer.models.MODEL
        An object of a model class inherit from tensorlayer.models.MODEL class,
        should implement forward function and cal_loss function to make it compatible with the existing pipeline

        The forward funtion should follow the signature below:
|           openpose models: def forward(self,x,is_train=False) ,return conf_map,paf_map,stage_confs,stage_pafs
|           poseproposal models: def forward(self,x,is_train=False), return pc,pi,px,py,pw,ph,pe

        The cal_loss function should follow the signature below:

|           openpose models: def cal_loss(self,stage_confs,stage_pafs,gt_conf,gt_paf,mask), return loss,loss_confs,loss_pafs

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…