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, *args, **kwargs)[source]
Return type:ndarray
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, *args, **kwargs)[source]
Return type:ndarray
train(*args, **kwargs)

Train the model, need to be overrided