original_docstring: 
      Generates matplotlib Figure using a trained network, along with images
      and labels from a batch, that shows the network's top prediction along
      with its probability, alongside the actual label, coloring this
      information based on whether the prediction was correct or not.
      Uses the "images_to_probs" function.
      
docstring: Generates matplotlib Figure using a trained network, along with images
  and labels from a batch, that shows the network's top prediction along
  with its probability, alongside the actual label, coloring this
  information based on whether the prediction was correct or not.
  Uses the "images_to_probs" function.
docstring_tokens: Generates matplotlib Figure using a trained network along with images and labels from a batch that shows the network ' s top prediction along with its probability alongside the actual label coloring this information based on whether the prediction was correct or not . Uses the " images_to_probs " function .
code: def plot_classes_preds(net, images, labels):
      '''
      Generates matplotlib Figure using a trained network, along with images
      and labels from a batch, that shows the network's top prediction along
      with its probability, alongside the actual label, coloring this
      information based on whether the prediction was correct or not.
      Uses the "images_to_probs" function.
      '''
      preds, probs = images_to_probs(net, images)
      # plot the images in the batch, along with predicted and true labels
      fig = plt.figure(figsize=(48, 48))
      for idx in np.arange(32):
          ax = fig.add_subplot(4, 8, idx+1, xticks=[], yticks=[])
          matplotlib_imshow(images[idx], one_channel=False)
          ax.set_title("{0}, {1:.1f}%\n(label: {2})".format(
              classes[preds[idx]],
              probs[idx] * 100.0,
              classes[labels[idx]]),
                      color=(
                          "green" if preds[idx] == labels[idx].item(
                          ) else "red"))
      return fig
code_tokens: def plot_classes_preds ( net , images , labels ) : preds , probs = images_to_probs ( net , images ) fig = plt . figure ( figsize = ( 48 , 48 ) ) for idx in np . arange ( 32 ) : ax = fig . add_subplot ( 4 , 8 , idx + 1 , xticks = [ ] , yticks = [ ] ) matplotlib_imshow ( images [ idx ] , one_channel = False ) ax . set_title ( "{0}, {1:.1f}%\n(label: {2})" . format ( classes [ preds [ idx ] ] , probs [ idx ] * 100.0 , classes [ labels [ idx ] ] ) , color = ( "green" if preds [ idx ] == labels [ idx ] . item ( ) else "red" ) ) return fig
short_docstring: Generates matplotlib Figure using a trained network, along with images
  and labels from a batch, that shows the network's top prediction along
  with its probability, alongside the actual label, coloring this
  information based on whether the prediction was correct or not.
short_docstring_tokens: Generates matplotlib Figure using a trained network along with images and labels from a batch that shows the network ' s top prediction along with its probability alongside the actual label coloring this information based on whether the prediction was correct or not .
comment: '''
      Generates matplotlib Figure using a trained network, along with images
      and labels from a batch, that shows the network's top prediction along
      with its probability, alongside the actual label, coloring this
      information based on whether the prediction was correct or not.
      Uses the "images_to_probs" function.
      '''$SEP$# plot the images in the batch, along with predicted and true labels