class_docstr: BERT single sentence (or concatenated sentences) regression.
class_docstr_tok: ["BERT","single","sentence","(","or","concatenated","sentences",")","regression","."]
code: def from_config(
      cls, config: Config, tensorizers: Dict[str, Tensorizer]
  ):
      vocab = tensorizers["tokens"].vocab
      encoder = create_module(
          config.encoder,
          padding_idx=vocab.get_pad_index(),
          vocab_size=vocab.__len__(),
      )
      decoder = create_module(
          config.decoder, in_dim=encoder.representation_dim, out_dim=1
      )
      output_layer = RegressionOutputLayer.from_config(
          config.output_layer
      )
      return cls(encoder, decoder, output_layer)
  
file_path: pytext/pytext/models/bert_regression_model.py
imports: from typing import Dict, Optional
  from pytext.config import ConfigBase
  from pytext.data.bert_tensorizer import BERTTensorizer
  from pytext.data.tensorizers import NumericLabelTensorizer, Tensorizer
  from pytext.models.bert_classification_models import BertPairwiseModel, NewBertModel
  from pytext.models.decoders.mlp_decoder import MLPDecoder
  from pytext.models.module import create_module
  from pytext.models.output_layers import PairwiseCosineRegressionOutputLayer, RegressionOutputLayer
  from pytext.utils.usage import log_class_usage
label_desc: Use image node_id 1 for calling the NewBertRegressionModel obj's underlying member method code with example usage: obj.from_config(cls, config, tensorizers) and returns: cls