class_docstr: This class is adapted with modifications in support of the MXNet NDArray types from
  https://github.com/lanpa/tensorboard-pytorch/blob/master/tensorboardX/writer.py.
  The `SummaryWriter` class provides a high-level api to create an event file in a
  given directory and add summaries and events to it. This class writes data to the
  event file asynchronously.
  This class is a wrapper of the FileWriter class. It's recommended that users use
  the APIs of this class to log MXNet data for visualization as they are directly compatible with
  the MXNet data types.
  
  Examples
  --------
  >>> data = mx.nd.random.uniform(size=(10, 10))
  >>> with SummaryWriter(logdir='logs') as sw:
  >>>     sw.add_histogram(tag='my_hist', values=data, global_step=0, bins=100)
docstr: Adds precision-recall curve.
  
  Note: This function internally calls `asnumpy()` for MXNet `NDArray` inputs.
  Since `asnumpy()` is a blocking function call, this function would block the main
  thread till it returns. It may consequently affect the performance of async execution
  of the MXNet engine.
  
  Parameters
  ----------
      tag : str
          A tag attached to the summary. Used by TensorBoard for organization.
      labels : MXNet `NDArray` or `numpy.ndarray`.
          The ground truth values. A tensor of 0/1 values with arbitrary shape.
      predictions : MXNet `NDArray` or `numpy.ndarray`.
          A float32 tensor whose values are in the range `[0, 1]`. Dimensions must match
          those of `labels`.
      num_thresholds : int
          Number of thresholds, evenly distributed in `[0, 1]`, to compute PR metrics for.
          Should be `>= 2`. This value should be a constant integer value, not a tensor
          that stores an integer.
          The thresholds for computing the pr curves are calculated in the following way:
          `width = 1.0 / (num_thresholds - 1),
          thresholds = [0.0, 1*width, 2*width, 3*width, ..., 1.0]`.
      global_step : int
          Global step value to record.
      weights : MXNet `NDArray` or `numpy.ndarray`.
          Optional float32 tensor. Individual counts are multiplied by this value.
          This tensor must be either the same shape as or broadcastable to the `labels`
          tensor.
docstr_tok: ["Adds","precision-recall","curve",".","Note",":","This","function","internally","calls","`","asnumpy","(",")","`","for","MXNet","`","NDArray","`","inputs",".","Since","`","asnumpy","(",")","`","is","a","blocking","function","call",",","this","function","would","block","the","main","thread","till","it","returns",".","It","may","consequently","affect","the","performance","of","async","execution","of","the","MXNet","engine",".","Parameters","--","--","--","--","--","tag",":","str","A","tag","attached","to","the","summary",".","Used","by","TensorBoard","for","organization",".","labels",":","MXNet","`","NDArray","`","or","`","numpy.ndarray","`",".","The","ground","truth","values",".","A","tensor","of","0\/1","values","with","arbitrary","shape",".","predictions",":","MXNet","`","NDArray","`","or","`","numpy.ndarray","`",".","A","float32","tensor","whose","values","are","in","the","range","`","[","0",",","1","]","`",".","Dimensions","must","match","those","of","`","labels","`",".","num_thresholds",":","int","Number","of","thresholds",",","evenly","distributed","in","`","[","0",",","1","]","`",",","to","compute","PR","metrics","for",".","Should","be","`",">","=","2","`",".","This","value","should","be","a","constant","integer","value",",","not","a","tensor","that","stores","an","integer",".","The","thresholds","for","computing","the","pr","curves","are","calculated","in","the","following","way",":","`","width","=","1.0","\/","(","num_thresholds","-","1",")",",","thresholds","=","[","0.0",",","1","*","width",",","2","*","width",",","3","*","width",",","...",",","1.0","]","`",".","global_step",":","int","Global","step","value","to","record",".","weights",":","MXNet","`","NDArray","`","or","`","numpy.ndarray","`",".","Optional","float32","tensor",".","Individual","counts","are","multiplied","by","this","value",".","This","tensor","must","be","either","the","same","shape","as","or","broadcastable","to","the","`","labels","`","tensor","."]
code: def add_pr_curve(
      self,
      tag,
      labels,
      predictions,
      num_thresholds,
      global_step=None,
      weights=None,
  ):
      """Adds precision-recall curve.
  
      Note: This function internally calls `asnumpy()` for MXNet `NDArray` inputs.
      Since `asnumpy()` is a blocking function call, this function would block the main
      thread till it returns. It may consequently affect the performance of async execution
      of the MXNet engine.
  
      Parameters
      ----------
          tag : str
              A tag attached to the summary. Used by TensorBoard for organization.
          labels : MXNet `NDArray` or `numpy.ndarray`.
              The ground truth values. A tensor of 0/1 values with arbitrary shape.
          predictions : MXNet `NDArray` or `numpy.ndarray`.
              A float32 tensor whose values are in the range `[0, 1]`. Dimensions must match
              those of `labels`.
          num_thresholds : int
              Number of thresholds, evenly distributed in `[0, 1]`, to compute PR metrics for.
              Should be `>= 2`. This value should be a constant integer value, not a tensor
              that stores an integer.
              The thresholds for computing the pr curves are calculated in the following way:
              `width = 1.0 / (num_thresholds - 1),
              thresholds = [0.0, 1*width, 2*width, 3*width, ..., 1.0]`.
          global_step : int
              Global step value to record.
          weights : MXNet `NDArray` or `numpy.ndarray`.
              Optional float32 tensor. Individual counts are multiplied by this value.
              This tensor must be either the same shape as or broadcastable to the `labels`
              tensor.
      """
      if num_thresholds < 2:
          raise ValueError("num_thresholds must be >= 2")
      labels = _make_numpy_array(labels)
      predictions = _make_numpy_array(predictions)
      self._file_writer.add_summary(
          pr_curve_summary(
              tag, labels, predictions, num_thresholds, weights
          ),
          global_step,
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import time
  import json
  import os
  import logging
  from .proto import event_pb2
  from .proto import summary_pb2
  from .event_file_writer import EventFileWriter
  from .summary import scalar_summary, histogram_summary, image_summary, audio_summary
  from .summary import text_summary, pr_curve_summary, _net2pb
  from .utils import _save_embedding_tsv, _make_sprite_image, _make_metadata_tsv
  from .utils import _add_embedding_config, _make_numpy_array, _get_embedding_dir
  from .utils import _is_2D_matrix
label_desc: Use image node_id 16 for calling the SummaryWriter obj's underlying member method code with example usage: obj.add_pr_curve(tag, labels, predictions, num_thresholds, global_step, weights) without return types