clean up forward pass interp errors
This commit is contained in:
parent
cb4912c271
commit
7c450c3200
@ -25,10 +25,15 @@ end
|
|||||||
|
|
||||||
imap(f, args...) = f(args...)
|
imap(f, args...) = f(args...)
|
||||||
|
|
||||||
|
function interp(ctx, f, xs...)
|
||||||
|
@ithrow ctx f(xs...)
|
||||||
|
end
|
||||||
|
|
||||||
# TODO: batching should be secondary
|
# TODO: batching should be secondary
|
||||||
|
|
||||||
function interpmodel(m, args::Batch...)
|
function interpmodel(m, args::Batch...)
|
||||||
rebatch(interpret(reifyparams(graph(m)), map(rawbatch, args)...))
|
ctx = Context(mux(iline, ilambda, iconst, iargs, ituple, interp))
|
||||||
|
rebatch(@icatch interpret(ctx, reifyparams(graph(m)), map(rawbatch, args)...))
|
||||||
end
|
end
|
||||||
|
|
||||||
interpmodel(m, args...) = unbatchone(interpmodel(m, batchone(args)...))
|
interpmodel(m, args...) = unbatchone(interpmodel(m, batchone(args)...))
|
||||||
|
Loading…
Reference in New Issue
Block a user