Hi @yifeim,

You are using the wrong metric. you don’t want to compute the accuracy as a logistic regression would, but you want to compare whether the output is above or below 0.5.

Here is the fixed code:

```
sym = mx.sym.LogisticRegressionOutput(
mx.sym.FullyConnected(data=mx.sym.Variable('data'), num_hidden=1, name ='fc'),
label=mx.sym.Variable('softmax_label')
)
train_iter = mx.io.NDArrayIter(data, label, 100,)
mod = mx.mod.Module(symbol=sym)
metric = mx.metric.CustomMetric(lambda label,y: np.mean((y[:,-1]>.5)==label), name='Real-Accuracy')
mod.fit(train_iter, eval_metric=metric, num_epoch=5,
optimizer='adam', optimizer_params={'learning_rate':1.})
print(mod.score(train_iter, metric))
print(np.mean((mod.predict(train_iter).asnumpy()[:,-1]>.5)==label))
```

```
INFO:root:Epoch[0] Train-Real-Accuracy=0.360000
INFO:root:Epoch[0] Time cost=0.002
INFO:root:Epoch[1] Train-Real-Accuracy=0.770000
INFO:root:Epoch[1] Time cost=0.001
INFO:root:Epoch[2] Train-Real-Accuracy=0.950000
INFO:root:Epoch[2] Time cost=0.001
INFO:root:Epoch[3] Train-Real-Accuracy=0.990000
INFO:root:Epoch[3] Time cost=0.001
INFO:root:Epoch[4] Train-Real-Accuracy=0.970000
INFO:root:Epoch[4] Time cost=0.001
[('Real-Accuracy', 0.96999999999999997)]
0.97
```