remove from training.jl

This commit is contained in:
Mike J Innes 2017-05-01 13:47:08 +01:00
parent 6778d00dbf
commit 33c6781c99

View File

@ -1,17 +1,3 @@
tobatch(xs::Batch) = rawbatch(xs)
tobatch(xs) = tobatch(batchone(xs))
function accuracy(m, data)
n = 0
correct = 0
for (x, y) in data
x, y = tobatch.((x, y))
n += size(x, 1)
correct += sum(onecold(m(x)) .== onecold(y))
end
return correct/n
end
"""
@cb for ... end t expr