tf cycle conversion error

This commit is contained in:
Mike J Innes 2016-10-28 17:12:19 +01:00
parent c5a64391a1
commit 217e28653a
1 changed files with 1 additions and 0 deletions

View File

@ -54,6 +54,7 @@ end
function graph(params::Associative, model, args...)
g = Flux.graph(model)
g == nothing && return graph(model, args...)
Flow.iscyclic(g) && error("This model has a cycle; try unrolling it first.")
graph(params, g, args...)
end