Classification. By default this problem will use [CLS] token embedding.

Example: m3tl.predefined_problems.get_weibo_fake_cls_fn.

Imports and utils

Top Layer

class Classification[source]

Classification(*args, **kwargs) :: Layer

Classification Top Layer

Get or make label encoder function

cls_get_or_make_label_encoder_fn[source]

cls_get_or_make_label_encoder_fn(params:BaseParams, problem:str, mode:str, label_list:List[str], *args, **kwargs)

Label handing function

cls_label_handling_fn[source]

cls_label_handling_fn(target, label_encoder=None, tokenizer=None, decoding_length=None, *args, **kwargs)