I found the reason:
for this function:
the C has to >=0 and <= C-1
is there any way to get around this.
e.g. I want a class C 1,3,4,5 in MINST dataset

Screenshot from 2018-01-22 13-29-49.png764×640 52.1 KB