Source code for pytext.models.representations.representation_base

#!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved

from pytext.models.module import Module


[docs]class RepresentationBase(Module): def __init__(self, config): super().__init__(config) self.representation_dim = None
[docs] def forward(self, *inputs): raise NotImplementedError()
[docs] def get_representation_dim(self): return self.representation_dim
def _preprocess_inputs(self, inputs): raise NotImplementedError()