You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
auto_name! currently concatenates the name of all parents. If one is constructing a deep network with two-operand functions, the size of the name will double at every level. Consider the following code:
using Reactive
s1 = Signal(1)
s2 = Signal(2)
for i in 1:100
s1 = map(+, s1, s2)
s2 = map(-, s1, s2)
println(s1)
println(s2)
end
this will either take very long, break or run out of memory.
auto_name! currently concatenates the name of all parents. If one is constructing a deep network with two-operand functions, the size of the name will double at every level. Consider the following code:
this will either take very long, break or run out of memory.
Suggested solution:
#1: limit the size of the name. In core.jl:
const max_name_length = 256 #name size is capped to avoid exponential name explosion
...
name:
201: "map(map(map(map(map(map(map(map(map(map(map(map(map(map(map(map(map(map(map(map(map(map(map(map(map(map(map(map(map(map(map(m ... -2)-2)-2)-2)-2)-2)-2)-2)-2)-2)-2)-2)-2)-2)-2)-2)-2)-4)-2)-2)-2)-2)-2)-2)-2)-2)-2)-2)-2)-2)-2)-2)-2)-2)-2)-2)-2)-2)-2)-2)-2)-2)" = 8772199286381852747 Int64
#2: use the ID instead of the name. This has the added advantage that it maps to the DAG quite obviously.
name:
201: "map(199, 200)" = 8772199286381852747 Int64
both of them avoid the name blowup problem.
The text was updated successfully, but these errors were encountered: