marleneberke / ORB_project3

0 stars 1 forks source link

InexactError: Bool(1.885530852914017) in with_locationLhack.jl #11

Closed marleneberke closed 4 years ago

marleneberke commented 4 years ago

ERROR: LoadError: InexactError: Bool(1.885530852914017) Stacktrace: [1] Type at ./float.jl:73 [inlined] [2] convert(::Type{Bool}, ::Float64) at ./number.jl:7 [3] traceat(::Gen.GFRegenerateState, ::Gen.Bernoulli, ::Tuple{Float64}, ::Tuple{Symbol,Int64,Int64,Int64}) at /Users/marleneberke/.julia/packages/Gen/eQpFO/src/dynamic/regenerate.jl:29 [4] ##gm#389(::Gen.GFRegenerateState, ::Array{String,1}, ::Int64, ::Int64, ::Float64, ::Float64) at /Users/marleneberke/Documents/03_Yale/Projects/001_Mask_RCNN/ORB_project3/with_location_hack.jl:380 [5] exec(::DynamicDSLFunction{Any}, ::Gen.GFRegenerateState, ::Tuple{Array{String,1},Int64,Int64,Float64,Float64}) at /Users/marleneberke/.julia/packages/Gen/eQpFO/src/dynamic/dynamic.jl:39 [6] regenerate(::Gen.DynamicDSLTrace{DynamicDSLFunction{Any}}, ::Tuple{Array{String,1},Int64,Int64,Float64,Float64}, ::NTuple{5,NoChange}, ::DynamicSelection) at /Users/marleneberke/.julia/packages/Gen/eQpFO/src/dynamic/regenerate.jl:137 [7] metropolis_hastings2(::Gen.DynamicDSLTrace{DynamicDSLFunction{Any}}, ::DynamicSelection) at /Users/marleneberke/Documents/03_Yale/Projects/001_Mask_RCNN/ORB_project3/with_location_hack.jl:230 [8] block_resimulation_update(::Gen.DynamicDSLTrace{DynamicDSLFunction{Any}}) at /Users/marleneberke/Documents/03_Yale/Projects/001_Mask_RCNN/ORB_project3/with_location_hack.jl:620 [9] every_step(::Array{String,1}, ::Int64, ::Int64, ::DynamicChoiceMap, ::Int64) at /Users/marleneberke/Documents/03_Yale/Projects/001_Mask_RCNN/ORB_project3/with_location_hack.jl:639 [10] top-level scope at util.jl:289 [11] include at ./boot.jl:328 [inlined] [12] include_relative(::Module, ::String) at ./loading.jl:1094 [13] include(::Module, ::String) at ./Base.jl:31 [14] include(::String) at ./client.jl:431

in expression starting at /Users/marleneberke/Documents/03_Yale/Projects/001_Mask_RCNN/ORB_project3/with_location_hack.jl:971

marleneberke commented 4 years ago

@belledon

marleneberke commented 4 years ago

like to regenerate.jl: https://github.com/probcomp/Gen/blob/9be333c310f9478b839636797d2428daab758bf6/src/dynamic/regenerate.jl

belledon commented 4 years ago

ive never seen this error but it sounds like you are using your own mh implementation

belledon commented 4 years ago

my intuition is that you are given bernoulli a number > 1

marleneberke commented 4 years ago

It should just be 1.0... hm

On Fri, Feb 28, 2020 at 7:14 PM Mario Belledonne notifications@github.com wrote:

my intuition is that you are given bernoulli a number > 1

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mdb293/ORB_project3/issues/11?email_source=notifications&email_token=AEXMZRZ3NJPXXGPX77QY5XTRFGSHPA5CNFSM4K53LG2KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENKTQ5Q#issuecomment-592787574, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEXMZR4BHDZQPRNJU6NW6ALRFGSHPANCNFSM4K53LG2A .