original_docstring: Trains a neural net regression model.
    
      Args:
        features: pandas DataFrame of features
        targets: pandas DataFrame of targets
        batch_size: Size of batches to be passed to the model
        shuffle: True or False. Whether to shuffle the data.
        num_epochs: Number of epochs for which data should be repeated. None = repeat indefinitely
      Returns:
        Tuple of (features, labels) for next data batch
      
docstring: Trains a neural net regression model.
docstring_tokens: Trains a neural net regression model .
code: def my_input_fn(features, targets, batch_size=1, shuffle=True, num_epochs=None):
      """Trains a neural net regression model.
    
      Args:
        features: pandas DataFrame of features
        targets: pandas DataFrame of targets
        batch_size: Size of batches to be passed to the model
        shuffle: True or False. Whether to shuffle the data.
        num_epochs: Number of epochs for which data should be repeated. None = repeat indefinitely
      Returns:
        Tuple of (features, labels) for next data batch
      """
      
      # Convert pandas data into a dict of np arrays.
      features = {key:np.array(value) for key,value in dict(features).items()}                                             
   
      # Construct a dataset, and configure batching/repeating.
      ds = Dataset.from_tensor_slices((features,targets)) # warning: 2GB limit
      ds = ds.batch(batch_size).repeat(num_epochs)
      
      # Shuffle the data, if specified.
      if shuffle:
        ds = ds.shuffle(10000)
      
      # Return the next batch of data.
      features, labels = ds.make_one_shot_iterator().get_next()
      return features, labels
code_tokens: def my_input_fn ( features , targets , batch_size = 1 , shuffle = True , num_epochs = None ) : features = { key : np . array ( value ) for key , value in dict ( features ) . items ( ) } ds = Dataset . from_tensor_slices ( ( features , targets ) ) ds = ds . batch ( batch_size ) . repeat ( num_epochs ) if shuffle : ds = ds . shuffle ( 10000 ) features , labels = ds . make_one_shot_iterator ( ) . get_next ( ) return features , labels
short_docstring: Trains a neural net regression model.
short_docstring_tokens: Trains a neural net regression model .
comment: """Trains a neural net regression model.
    
      Args:
        features: pandas DataFrame of features
        targets: pandas DataFrame of targets
        batch_size: Size of batches to be passed to the model
        shuffle: True or False. Whether to shuffle the data.
        num_epochs: Number of epochs for which data should be repeated. None = repeat indefinitely
      Returns:
        Tuple of (features, labels) for next data batch
      """$SEP$# Convert pandas data into a dict of np arrays.$SEP$# Construct a dataset, and configure batching/repeating.$SEP$# warning: 2GB limit$SEP$# Shuffle the data, if specified.$SEP$# Return the next batch of data.