MCPcopy Create free account
hub / github.com/Newmu/dcgan_code / nnc_score

Function nnc_score

lib/metrics.py:93–96  ·  view source on GitHub ↗
(trX, trY, teX, teY, metric='euclidean')

Source from the content-addressed store, hash-verified

91euclid_dist = theano.function([A, B], ed)
92
93def nnc_score(trX, trY, teX, teY, metric='euclidean'):
94 pred = gpu_nnc_predict(trX, trY, teX, metric=metric)
95 acc = metrics.accuracy_score(teY, pred)
96 return acc*100.
97
98def nnd_score(trX, teX, metric='euclidean'):
99 return gpu_nnd_score(trX, teX, metric=metric)

Callers 1

Calls 1

gpu_nnc_predictFunction · 0.85

Tested by

no test coverage detected