original_docstring: 
              Called after each step finished.
              Args:
              run_context (RunContext): Include some information of the model.
          
docstring: Called after each step finished.
  Args:
  run_context (RunContext): Include some information of the model.
docstring_tokens: Called after each step finished . Args : run_context ( RunContext ) : Include some information of the model .
code: def step_end(self, run_context):
          """
              Called after each step finished.
              Args:
              run_context (RunContext): Include some information of the model.
          """
          cb_params = run_context.original_args()
          rpn_loss = cb_params.net_outputs.asnumpy()
          self.count += 1
          self.rpn_loss_sum += float(rpn_loss)
          cur_step_in_epoch = (cb_params.cur_step_num - 1) % cb_params.batch_num + 1
          if self.count >= 1:
              time_stamp_current = time.time()
              rpn_loss = self.rpn_loss_sum / self.count
              loss_file = open(os.path.join(self.local_output_url, lossLogName), "a+")
              loss_file.write("%lu epoch: %s step: %s ,rpn_loss: %.5f" %
                              (time_stamp_current - self.time_stamp_first, cb_params.cur_epoch_num, cur_step_in_epoch,
                               rpn_loss))
              loss_file.write("\n")
              loss_file.close()
              if self.run_modelart and (self.device_num == 1 or self.device_id == 0):
                  import moxing as mox
                  mox.file.copy_parallel(src_url=os.path.join(self.local_output_url, lossLogName),
                                         dst_url=os.path.join(self.args.train_url, lossLogName))
code_tokens: def step_end ( self , run_context ) : cb_params = run_context . original_args ( ) rpn_loss = cb_params . net_outputs . asnumpy ( ) self . count += 1 self . rpn_loss_sum += float ( rpn_loss ) cur_step_in_epoch = ( cb_params . cur_step_num - 1 ) % cb_params . batch_num + 1 if self . count >= 1 : time_stamp_current = time . time ( ) rpn_loss = self . rpn_loss_sum / self . count loss_file = open ( os . path . join ( self . local_output_url , lossLogName ) , "a+" ) loss_file . write ( "%lu epoch: %s step: %s ,rpn_loss: %.5f" % ( time_stamp_current - self . time_stamp_first , cb_params . cur_epoch_num , cur_step_in_epoch , rpn_loss ) ) loss_file . write ( "\n" ) loss_file . close ( ) if self . run_modelart and ( self . device_num == 1 or self . device_id == 0 ) : import moxing as mox mox . file . copy_parallel ( src_url = os . path . join ( self . local_output_url , lossLogName ) , dst_url = os . path . join ( self . args . train_url , lossLogName ) )
short_docstring: Called after each step finished.
short_docstring_tokens: Called after each step finished .
comment: """
              Called after each step finished.
              Args:
              run_context (RunContext): Include some information of the model.
          """