class_docstr: Regression model.
  
  Subclasses must set the following attributes:
    output: Op(s) used for computing regression loss and predicted regression
      outputs for each task.
class_docstr_tok: ["Regression","model",".","Subclasses","must","set","the","following","attributes",":","output",":","Op","(","s",")","used","for","computing","regression","loss","and","predicted","regression","outputs","for","each","task","."]
docstr: Calculate single-task training cost for a batch of examples.
  
  Args:
    output: Tensor with shape batch_size containing predicted values.
    labels: Tensor with shape batch_size containing true values.
    weights: Tensor with shape batch_size containing example weights.
  
  Returns:
    A tensor with shape batch_size containing the weighted cost for each
    example.
docstr_tok: ["Calculate","single-task","training","cost","for","a","batch","of","examples",".","Args",":","output",":","Tensor","with","shape","batch_size","containing","predicted","values",".","labels",":","Tensor","with","shape","batch_size","containing","true","values",".","weights",":","Tensor","with","shape","batch_size","containing","example","weights",".","Returns",":","A","tensor","with","shape","batch_size","containing","the","weighted","cost","for","each","example","."]
code: def cost(self, output, labels, weights):
      """Calculate single-task training cost for a batch of examples.
  
      Args:
        output: Tensor with shape batch_size containing predicted values.
        labels: Tensor with shape batch_size containing true values.
        weights: Tensor with shape batch_size containing example weights.
  
      Returns:
        A tensor with shape batch_size containing the weighted cost for each
        example.
      """
      return tf.multiply(0.5 * tf.square(output - labels), weights)
  
imports: from __future__ import print_function
  from __future__ import division
  from __future__ import unicode_literals
  import collections
  import pickle
  import os
  import time
  import warnings
  import numpy
  import pandas
  import tensorflow
  import tempfile
  from deepchem.models import Model
  from deepchem.metrics import from_one_hot
  from deepchem.nn import model_ops
  from deepchem.models.tensorflow_models import utils
  from deepchem.trans import undo_transforms
  from deepchem.utils.save import log
  from deepchem.utils.evaluate import Evaluator
  from deepchem.data import pad_features
  from tensorflow.contrib.layers.python.layers import batch_norm
label_desc: Use image node_id 3 for calling the TensorflowRegressor obj's underlying member method code with example usage: obj.cost(output, labels, weights) and returns: tf