class_docstr: CenterNet network using Hourglass from https://arxiv.org/abs/1904.07850S.
class_docstr_tok: ["CenterNet","network","using","Hourglass","from","https",":","\/\/arxiv.org\/abs\/1904.07850S","."]
docstr: Test function.
docstr_tok: ["Test","function","."]
code: def test_sample(self, sample, compute_loss=False, training=False):
      """Test function."""
      outputs = self.network(
          sample[self.sample_input_image], training=training
      )
      outputs[-1] = self.more_things(
          outputs[-1], sample, training=False
      )
  
      loss = None
      if compute_loss:
          total_loss, per_output_per_head_loss = self.compute_loss(
              sample, sample, outputs
          )
          loss = {"total_loss": total_loss, **per_output_per_head_loss}
      return outputs, loss
  
imports: import collections
  import os
  import random
  import string
  import time
  from absl import logging
  import numpy
  import tensorflow
  from tensorflow_graphics.projects.points_to_3Dobjects.models import centernet_utils
  from tensorflow_graphics.projects.points_to_3Dobjects.networks import hourglass
  from tensorflow_graphics.projects.points_to_3Dobjects.transforms import transforms
  from tensorflow_graphics.projects.points_to_3Dobjects.utils import image
  from google3.pyglib import gfile
label_desc: Use image node_id 10 for calling the CenterNetVID obj's underlying member method code with example usage: obj.test_sample(sample, compute_loss, training) and returns: outputs,  loss