fix for empty dicts

This commit is contained in:
Mike J Innes 2017-02-20 23:45:07 +00:00
parent 54011045e7
commit b49daa367f

View File

@ -90,6 +90,6 @@ function mx.FeedForward(model::Flux.Model; input = :data, label = :softmax, cont
model = rewrite_softmax(model, label)
vars, stacks, node = tograph(model, mx.Variable(input))
ff = mx.FeedForward(node, context = context)
ff.arg_params = mxargs(vars)
isempty(vars) || (ff.arg_params = mxargs(vars))
return ff
end