remove from training.jl
This commit is contained in:
parent
6778d00dbf
commit
33c6781c99
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user