(self, vocab_dict)
Load fields from vocab.pt, and set the `fields` attribute.

        Args:
            vocab_dict (dict): a dict of loaded vocab from vocab.pt file.
Load fields from vocab.pt, and set the `fields` attribute.
Load fields from vocab . pt and set the fields attribute .
def load_fields(self, vocab_dict):
        """ Load fields from vocab.pt, and set the `fields` attribute.

        Args:
            vocab_dict (dict): a dict of loaded vocab from vocab.pt file.
        """
        fields = onmt.inputters.inputter.load_fields_from_vocab(
            vocab_dict.items(), self.data_type)
        self.fields = dict([(k, f) for (k, f) in fields.items()
                            if k in self.examples[0].__dict__])
def load_fields ( self , vocab_dict ) : fields = onmt . inputters . inputter . load_fields_from_vocab ( vocab_dict . items ( ) , self . data_type ) self . fields = dict ( [ ( k , f ) for ( k , f ) in fields . items ( ) if k in self . examples [ 0 ] . __dict__ ] )