aadeshnpn / OSDN

Keras implementation for the research paper "Towards Open Set Deep Networks" A Bendale, T Boult, CVPR 2016
GNU Lesser General Public License v3.0
78 stars 21 forks source link

Update openmax.py #4

Closed wzaielamri closed 4 years ago

wzaielamri commented 5 years ago

the mark should be updated to a + 1 Take this example: 0000 1111 2222 if you first append the zeros and you save mark = a (= 3) the next time you append you will get in the list [mark,7]: 01111.

you can, of course, optimize this code with this so you save the loop:

sort_x=np.array(sort_x) sort_y=np.array(sort_y) for i in range(len(label)): positions= np.where(sort_y==i)[0] dataset_x.append(sort_x[positions]) dataset_y.append(sort_y[positions])