title: AttributeError: 'DType' object has no attribute 'type'
body: <p>When I receive the training produces loss and accuracy (they are both tensor), I would like to use tf.comPat.v1.Keras.Utils.Progbar()function and the update method to update them, so that I can get a better look training process, but the following error occured:</p>
  <pre><code> File &quot;E:/python/maml_mnist/train.py&quot;, line 64, in &lt;module&gt;
  ,('accuracy',mean_train_meta_acc)]
  File &quot;C:\Users\12130\AppData\Roaming\Python\Python36\site- 
  packages\tensorflow\python\keras\utils\generic_utils.py&quot;, line 442, in update
  avg = np.mean(self._values[k][0] / max(1, self._values[k][1]))
  File &quot;&lt;__array_function__ internals&gt;&quot;, line 6, in mean
  File &quot;E:\python\lib\site-packages\numpy\core\fromnumeric.py&quot;, line 3373, in mean
  out=out, **kwargs)
  File &quot;E:\python\lib\site-packages\numpy\core\_methods.py&quot;, line 170, in _mean
  ret = ret.dtype.type(ret / rcount)
  AttributeError: 'DType' object has no attribute 'type' here
  </code></pre>
  <p>The code is as follows:</p>
  <pre><code>train_progbar = tf.compat.v1.keras.utils.Progbar(train_data.steps)
  for i in range(train_data.steps):
      batch_train_loss,batch_train_acc = maml.train_on_batch(train_data.get_one_batch(),
                                                                 inner_optimizer,
                                                                 inner_step=1,
                                                                 outer_optimizer=outer_optimizer)
  
      train_meta_loss.append(batch_train_loss)
      train_meta_acc.append(batch_train_acc)
      mean_train_meta_loss = np.mean(train_meta_loss)
      mean_train_meta_acc = np.mean(batch_train_acc)
  
      train_progbar.update(i+1
                               ,[('loss',mean_train_meta_loss)
                              ,('accuracy',mean_train_meta_acc)]
                               )
  </code></pre>
  <p>I know that the error was caused by  solving the average, but I don't know how to fix it to make the code run successfully.</p>
  <p>My version of TensorFlow is 1.14.0.</p>