code: def _get_accuracy(y_true, y_pred, mask, sparse_target=False):
      y_pred = K.argmax(y_pred, -1)
      if sparse_target:
          y_true = K.cast(y_true[:, :, 0], K.dtype(y_pred))
      else:
          y_true = K.argmax(y_true, -1)
      judge = K.cast(K.equal(y_pred, y_true), K.floatx())
      if mask is None:
          return K.mean(judge)
      else:
          mask = K.cast(mask, K.floatx())
          return K.sum(judge * mask) / K.sum(mask)
  
imports: from __future__ import absolute_import, division
  from ....None import utils
  from ....imports import *
label_desc: Use image node_id 3 for calling a global function with example usage: _get_accuracy(y_true, y_pred, mask, sparse_target) and returns: K, unknown