Closed xiuliren closed 7 years ago
this error comes from a super big neuron (id: 76197), which expands to the whole range of XY section!
suggestions from @nicholasturner1
I'd try the same thing I mentioned before - compare `prod(max_dims)` to the max index into the sparse vector (`maximum(Int[sub2ind(max_dims, points[i,:]... ) for i=1:num_points ])`) (edited)
[10:43]
the `prod` value should always be greater than or equal to the other one unless the indexing scheme is somehow wrong
indeed, it is this problem. max_dims = (3276,975,1750)
ERROR: LoadError: AssertionError: prod(max_dims) > maximum(Int[sub2ind(max_dims,points[i,:]...) for i = 1:num_points])
in create_node_lookup(::Array{UInt32,2}) at /home/nico/.julia/v0.5/RealNeuralNetworks/src/NodeNets.jl:349
in #NodeNet#3(::Array{Float64,1}, ::RealNeuralNetworks.NodeNets.#alexs_penalty, ::Tuple{UInt32,UInt32,UInt32}, ::Type{T},
::Array{UInt32,2}) at /home/nico/.julia/v0.5/RealNeuralNetworks/src/NodeNets.jl:74
in (::Core.#kw#Type)(::Array{Any,1}, ::Type{RealNeuralNetworks.NodeNets.NodeNet}, ::Array{UInt32,2}) at ./<missing>:0
in macro expansion at ./util.jl:188 [inlined]
in trace(::RealNeuralNetworks.Manifests.Manifest, ::Int64) at /home/nico/.julia/v0.5/RealNeuralNetworks/src/Manifests.jl:7
8
in #trace#1(::String, ::String, ::UInt32, ::Function, ::Int64) at /home/nico/.julia/v0.5/RealNeuralNetworks/scripts/skelet
onize.jl:20
in (::#kw##trace)(::Array{Any,1}, ::#trace, ::Int64) at ./<missing>:0
in main() at /home/nico/.julia/v0.5/RealNeuralNetworks/scripts/skeletonize.jl:94
in include_from_node1(::String) at ./loading.jl:488
in process_options(::Base.JLOptions) at ./client.jl:265
in _start() at ./client.jl:321
while loading /home/nico/.julia/v0.5/RealNeuralNetworks/scripts/skeletonize.jl, in expression starting on line 99
You mentioned that your chunk size is (512,512,512) before, and that the coordinates were local. If that's the case, the maximum possible value of max_dims should be (512,512,512), since it should be the maximum value in each dimension of the passed coordinates. Perhaps you're just making the data structures for the graph once you've finished chunk-wise processing.
You're using UInt32
, so this is another overflow problem. prod(3276,975,1750) > typemax(UInt32)
exactly, this is overflow. but not because the 512x512x512, but because the neuron spans a big space and the max_dims is too big.
prod((3276,975,1750)) > Int(typemax(UInt32)) = true
fixing issue: 6f581de5e512f152b86f51ba54a9f0a8e6f48bd7 a5c7d2f3e23bf3da22c7f5e3ce519a67c2008dc7
have already get swc file of more than 10 neurons, so this error happens occasionally.