gnes.encoder.text.bert module

class gnes.encoder.text.bert.BertEncoder(*args, **kwargs)[source]

Bases: gnes.encoder.base.BaseTextEncoder

close()[source]

Release the resources as model is destroyed

encode(text: List[str], *args, **kwargs) → numpy.ndarray[source]
is_trained = True
post_init()[source]

Declare class attributes/members that can not be serialized in standard way

store_args_kwargs = True
train(*args, **kwargs)

Train the model, need to be overrided

class gnes.encoder.text.bert.BertEncoderServer(*args, **kwargs)[source]

Bases: gnes.encoder.base.BaseTextEncoder

close()[source]

Release the resources as model is destroyed

is_trained = True
post_init()[source]

Declare class attributes/members that can not be serialized in standard way

store_args_kwargs = True
train(*args, **kwargs)

Train the model, need to be overrided

class gnes.encoder.text.bert.BertEncoderWithServer(*args, **kwargs)[source]

Bases: gnes.base.CompositionalTrainableBase

encode(text: List[str], *args, **kwargs) → numpy.ndarray[source]
train(*args, **kwargs)

Train the model, need to be overrided