def mean_absolute_percentage_error(y_true, y_pred):
    diff = K.abs((y_true - y_pred) / K.clip(K.abs(y_true), K.epsilon(), np.inf))
    return 100. * K.mean(diff)
dataset/ETHPy150Open fchollet/keras/keras/metrics.py/mean_absolute_percentage_error/original