cosense3d.modules package

Subpackages

Module contents

class cosense3d.modules.BaseModule(gather_keys, scatter_keys, gt_keys=[], freeze=False, **kwargs)[source]

Bases: Module

cat_data_from_list(input, key=None, pad_idx=False)[source]
cat_dict_list(d_list: List[Dict])[source]
cat_list(x_list, recursive=False)[source]

Concatenate sub_lists to one list

compose_imgs(img_list)[source]
compose_result_list(res, N)[source]
Parameters:
  • res – dict(k:list)

  • N

Returns:

compose_stensor(stensor_list, stride)[source]
decompose_stensor(res, N)[source]
format_input(input: List)[source]
format_output(output, B)[source]
forward(*args, **kwargs)[source]

Defines the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

freeze_parameters()[source]
loss(*args, **kwargs)[source]

This must be implemented in head module.

prepare_vis_data()[source]
stack_data_from_list(input, key=None)[source]
stack_dict_list(d_list: List[Dict])[source]
to_gpu(gpu_id)[source]
training: bool
cosense3d.modules.build_module(module_cfg)[source]