dump_feature#

(s3prl.task.dump_feature)

Dump feature Task

Authors
  • Yist Y. Lin 2021

  • Leo 2022

DumpFeature#

class s3prl.task.dump_feature.DumpFeature(model: Module, dump_feat_dir: str = 'feat')[source][source]#

Bases: Task

forward(split: str, x, x_len, unique_name, _dump_dir: str)[source][source]#

Define 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.

reduction(split: str, batch_results: list, _dump_dir: str)[source][source]#
call_super_init: bool = False[source]#
dump_patches: bool = False[source]#
get_state()[source]#
parse_cached_results(cached_results: List[dict])[source]#
abstract predict()[source]#
set_state(state: dict)[source]#
abstract test_reduction()[source]#
abstract test_step()[source]#
abstract train_reduction()[source]#
abstract train_step()[source]#
abstract valid_reduction()[source]#
abstract valid_step()[source]#
training: bool[source]#