code: def draw_confusion_matrix(matrix):
      '''Draw confusion matrix for MNIST.'''
      fig = tfmpl.create_figure(figsize=(7,7))
      ax = fig.add_subplot(111)
      ax.set_title('Confusion matrix for MNIST classification')
      
      tfmpl.plots.confusion_matrix.draw(
          ax, matrix,
          axis_labels=['Digit ' + str(x) for x in range(10)],
          normalize=True
      )
  
      return fif draw_confusion_matrix(matrix):
      '''Draw confusion matrix for MNIST.'''
      fig = tfmpl.create_figure(figsize=(7,7))
      ax = fig.add_subplot(111)
      ax.set_title('Confusion matrix for MNIST classification')
      
      tfmpl.plots.confusion_matrix.draw(
          ax, matrix,
          axis_labels=['Digit ' + str(x) for x in range(10)],
          normalize=True
      )
  
      return fig
docs: Draw confusion matrix for MNIST.