'Returns the accuracy.
Args:
y (Tensor or OpTree): Output of previous layer or model
t (Tensor or OpTree): True targets corresponding to y
Returns:
float: Returns the metric'

def __call__(self, y, t, calcrange=slice(0, None)):

    self.preds[:] = self.be.argmax(y, axis=0)
    self.hyps[:] = self.be.argmax(t, axis=0)
    self.outputs[:] = self.be.equal(self.preds, self.hyps)
    return self.outputs.get()[:, calcrange].mean()
