class_docstr: Model that's compatible with the new Model abstraction, and is configured for
  regression tasks (specifically for labels, predictions, and loss).
class_docstr_tok: ["Model","that","'s","compatible","with","the","new","Model","abstraction",",","and","is","configured","for","regression","tasks","(","specifically","for","labels",",","predictions",",","and","loss",")","."]
code: def from_config(
      cls, config: Config, tensorizers: Dict[str, Tensorizer]
  ):
      embedding = cls.create_embedding(config, tensorizers)
      representation = create_module(
          config.representation, embed_dim=embedding.embedding_dim
      )
      decoder = create_module(
          config.decoder,
          in_dim=representation.representation_dim,
          out_dim=1,
      )
      output_layer = RegressionOutputLayer.from_config(
          config.output_layer
      )
      return cls(embedding, representation, decoder, output_layer)
  
imports: from typing import Dict, List, Optional, Union
  import torch
  from pytext.config.component import create_loss
  from pytext.data.tensorizers import ByteTokenTensorizer, FloatListTensorizer, LabelTensorizer, NumericLabelTensorizer, Tensorizer, TokenTensorizer, UidTensorizer, VocabConfig
  from pytext.data.tokenizers import DoNothingTokenizer
  from pytext.exporters.exporter import ModelExporter
  from pytext.loss import BinaryCrossEntropyLoss, BinaryCrossEntropyWithLogitsLoss, MultiLabelSoftMarginLoss
  from pytext.models.decoders.mlp_decoder import DecoderBase, MLPDecoder
  from pytext.models.embeddings import CharacterEmbedding, EmbeddingBase, EmbeddingList, WordEmbedding
  from pytext.models.model import Model
  from pytext.models.module import create_module
  from pytext.models.output_layers import ClassificationOutputLayer, OutputLayerBase, RegressionOutputLayer
  from pytext.models.output_layers.doc_classification_output_layer import BinaryClassificationOutputLayer, MulticlassOutputLayer, MultiLabelOutputLayer
  from pytext.models.representations.bilstm_doc_attention import BiLSTMDocAttention
  from pytext.models.representations.deepcnn import DeepCNNRepresentation
  from pytext.models.representations.docnn import DocNNRepresentation
  from pytext.models.representations.pure_doc_attention import PureDocAttention
  from pytext.models.representations.representation_base import RepresentationBase
  from pytext.torchscript.utils import make_byte_inputs, make_sequence_lengths, truncate_tokens
  from pytext.torchscript.vocab import ScriptVocabulary
  from pytext.utils.label import get_label_weights
  from pytext.utils.usage import log_class_usage
  from pytorch.text.fb.utils.transform_utils import pad_2d
  from torch import jit
label_desc: Use image node_id 1 for calling the DocRegressionModel obj's underlying member method code with example usage: obj.from_config(cls, config, tensorizers) and returns: cls