code: def get_zipped_dataset_from_predictions(predictions):
    
    targets = stack_data_given_key(predictions, "targets")
    outputs = stack_data_given_key(predictions, "outputs")
    num_videos, num_steps = targets.shape[:2]
  
    # Truncate output time-steps to match target time-steps
    outputs = outputs[:, :num_steps]
  
    targets_placeholder = tf.placeholder(targets.dtype, targets.shape)
    outputs_placeholder = tf.placeholder(outputs.dtype, outputs.shape)
    dataset = tf.data.Dataset.from_tensor_slices(
        (targets_placeholder, outputs_placeholder))
    iterator = dataset.make_initializable_iterator()
    feed_dict = {targets_placeholder: targets,
                 outputs_placeholder: outputs}
    return iterator, feed_dict, num_videos
docs: Creates dataset from in-memory predictions.