Hi Martin,
I don’t really follow how different your custom log_prob is from the torch dist log_prob so hard to comment.
My custom log_prob should give the same answer as a torch.MultivariateNormal
. I do this to test whether the pyro.factor version of a model behaves the same (i.e. described the same posterior, samples with comparable performance) as one that has its likelihood described by a torch distribution. Using direct NUTS sampling, it seems that both approaches work the same way; i.e. they describe the same posterior, and they do this in a comparable time. Later the custom log_prob of course will be filled with some science-case dependent function.
a lot of these hyperparameters seem suspect
Right, these values are a bit dodgy indeed, although changing these to more sensible parameters does not change the situation.
Below an abridged version of a run with your suggestions (I changed num_steps_map
to 4000 to ensure a good maping):
Training the map
[utility_functions.py:107 - fit_guide ] 2023-03-12 11:04:18,980: [0] Elbo loss = 401.56
Parameters: tensor([-0.8701, -0.3759], grad_fn=<CopySlices>) logpdf: -417.0910949707031
Parameters: tensor([-0.1969, -0.8866], grad_fn=<CopySlices>) logpdf: -411.0481872558594
Parameters: tensor([-0.7899, -0.7184], grad_fn=<CopySlices>) logpdf: -417.52374267578125
Parameters: tensor([-0.5383, 0.4030], grad_fn=<CopySlices>) logpdf: -409.94989013671875
Parameters: tensor([-0.4523, 0.9954], grad_fn=<CopySlices>) logpdf: -406.62261962890625
Parameters: tensor([-0.6008, -0.6274], grad_fn=<CopySlices>) logpdf: -414.85101318359375
...
Parameters: tensor([37.9201, 21.0745], grad_fn=<CopySlices>) logpdf: -53.92456817626953
Parameters: tensor([38.2028, 20.7565], grad_fn=<CopySlices>) logpdf: -52.625579833984375
Parameters: tensor([38.1856, 20.9255], grad_fn=<CopySlices>) logpdf: -52.729034423828125
Parameters: tensor([37.7222, 21.0089], grad_fn=<CopySlices>) logpdf: -54.788536071777344
[utility_functions.py:107 - fit_guide ] 2023-03-12 11:05:03,640: [2000] Elbo loss = 52.04
Parameters: tensor([38.3260, 21.0676], grad_fn=<CopySlices>) logpdf: -52.146934509277344
Parameters: tensor([38.3312, 21.2793], grad_fn=<CopySlices>) logpdf: -52.174278259277344
Parameters: tensor([34.5970, 20.0134], grad_fn=<CopySlices>) logpdf: -69.58824920654297
Parameters: tensor([38.4475, 18.6872], grad_fn=<CopySlices>) logpdf: -51.680320739746094
...
Parameters: tensor([57.8790, 19.2454], grad_fn=<CopySlices>) logpdf: -5.563545227050781
Parameters: tensor([60.6054, 22.9342], grad_fn=<CopySlices>) logpdf: -5.9543609619140625
Parameters: tensor([60.5216, 14.6580], grad_fn=<CopySlices>) logpdf: -7.937607765197754
[utility_functions.py:107 - fit_guide ] 2023-03-12 11:05:38,309: [3900] Elbo loss = 3.08
Parameters: tensor([61.2317, 18.9709], grad_fn=<CopySlices>) logpdf: -5.314355850219727
Parameters: tensor([58.4747, 22.9687], grad_fn=<CopySlices>) logpdf: -6.1707377433776855
Sampling with NUTS through map:
Warmup: 0%| | 0/2500 [00:00, ?it/s]Parameters: tensor([57.1514, 21.7731]) logpdf: -6.1825947761535645
Parameters: tensor([60.3045, 16.8009]) logpdf: -6.089438438415527
Parameters: tensor([60.3045, 16.8009], grad_fn=<CopySlices>) logpdf: -6.089438438415527
Parameters: tensor([60.3045, 16.8009], grad_fn=<CopySlices>) logpdf: -6.089438438415527
Parameters: tensor([60.3045, 16.8009]) logpdf: -6.089438438415527
Parameters: tensor([60.3045, 16.8009], grad_fn=<CopySlices>) logpdf: -6.089438438415527
Parameters: tensor([60.9706, 13.8637], grad_fn=<CopySlices>) logpdf: -8.916431427001953
Parameters: tensor([60.3045, 16.8009], grad_fn=<CopySlices>) logpdf: -6.089438438415527
Parameters: tensor([59.8281, 16.2846], grad_fn=<CopySlices>) logpdf: -6.440091609954834
Parameters: tensor([61.3999, 15.5183], grad_fn=<CopySlices>) logpdf: -7.2612762451171875
Parameters: tensor([58.1171, 19.0009], grad_fn=<CopySlices>) logpdf: -5.5111236572265625
Parameters: tensor([55.7143, 20.7165], grad_fn=<CopySlices>) logpdf: -6.944823741912842
Parameters: tensor([61.9483, 15.7273], grad_fn=<CopySlices>) logpdf: -7.261930465698242
Parameters: tensor([62.2521, 17.4760], grad_fn=<CopySlices>) logpdf: -6.201027870178223
Parameters: tensor([62.4404, 20.1765], grad_fn=<CopySlices>) logpdf: -5.655401229858398
Parameters: tensor([62.5722, 22.0135], grad_fn=<CopySlices>) logpdf: -6.123801231384277
Warmup: 0%| | 1/2500 [00:00, 7.05it/s, step size=6.27e+00, acc. prob=0.925]Parameters: tensor([-33.6092, 5.2560], grad_fn=<CopySlices>) logpdf: -903.0630493164062
Parameters: tensor([62.3105, 18.4675], grad_fn=<CopySlices>) logpdf: -5.825458526611328
Parameters: tensor([61.9386, 13.4231], grad_fn=<CopySlices>) logpdf: -9.758113861083984
Parameters: tensor([60.4027, 20.9009], grad_fn=<CopySlices>) logpdf: -5.15412712097168
Parameters: tensor([53.8168, 22.0862], grad_fn=<CopySlices>) logpdf: -9.315200805664062
Parameters: tensor([59.9154, 21.5189], grad_fn=<CopySlices>) logpdf: -5.288169860839844
Parameters: tensor([60.7725, 19.9802], grad_fn=<CopySlices>) logpdf: -5.116472244262695
Parameters: tensor([61.0477, 18.9062], grad_fn=<CopySlices>) logpdf: -5.2861528396606445
Parameters: tensor([59.3019, 21.8560], grad_fn=<CopySlices>) logpdf: -5.449966907501221
Parameters: tensor([58.6254, 21.9962], grad_fn=<CopySlices>) logpdf: -5.644172191619873
Parameters: tensor([58.0993, 22.0397], grad_fn=<CopySlices>) logpdf: -5.834046363830566
Parameters: tensor([58.0192, 22.0794], grad_fn=<CopySlices>) logpdf: -5.8814778327941895
Warmup: 0%| | 5/2500 [00:00, 21.87it/s, step size=6.08e-01, acc. prob=0.659]Parameters: tensor([60.4149, 16.7628], grad_fn=<CopySlices>) logpdf: -6.121933460235596
Parameters: tensor([59.8736, 15.3839], grad_fn=<CopySlices>) logpdf: -7.189225196838379
Parameters: tensor([59.2717, 16.3354], grad_fn=<CopySlices>) logpdf: -6.452694892883301
Parameters: tensor([60.3831, 15.2356], grad_fn=<CopySlices>) logpdf: -7.341385364532471
Parameters: tensor([59.3250, 18.0749], grad_fn=<CopySlices>) logpdf: -5.472909450531006
Parameters: tensor([59.0927, 21.3579], grad_fn=<CopySlices>) logpdf: -5.3234734535217285
Parameters: tensor([60.3876, 18.5206], grad_fn=<CopySlices>) logpdf: -5.2906341552734375
Parameters: tensor([58.5527, 22.2232], grad_fn=<CopySlices>) logpdf: -5.760471820831299
Parameters: tensor([59.9282, 22.5524], grad_fn=<CopySlices>) logpdf: -5.7087202072143555
Parameters: tensor([60.3831, 18.6745], grad_fn=<CopySlices>) logpdf: -5.247136116027832
Parameters: tensor([60.9989, 22.8593], grad_fn=<CopySlices>) logpdf: -5.974071979522705
Parameters: tensor([61.2877, 20.1574], grad_fn=<CopySlices>) logpdf: -5.225040912628174
Warmup: 0%| | 9/2500 [00:00, 27.10it/s, step size=2.89e+00, acc. prob=0.781]Parameters: tensor([12.4390, 12.8969], grad_fn=<CopySlices>) logpdf: -236.30734252929688
Parameters: tensor([61.0980, 19.2484], grad_fn=<CopySlices>) logpdf: -5.233799934387207
Parameters: tensor([61.5800, 19.8165], grad_fn=<CopySlices>) logpdf: -5.309767246246338
Parameters: tensor([61.9148, 20.3383], grad_fn=<CopySlices>) logpdf: -5.434859752655029
Parameters: tensor([59.3125, 18.1233], grad_fn=<CopySlices>) logpdf: -5.456225395202637
Parameters: tensor([57.7870, 17.6128], grad_fn=<CopySlices>) logpdf: -6.116353988647461
Parameters: tensor([56.0189, 17.2025], grad_fn=<CopySlices>) logpdf: -7.4242472648620605
Parameters: tensor([54.9788, 17.0848], grad_fn=<CopySlices>) logpdf: -8.427913665771484
Parameters: tensor([55.6384, 17.4468], grad_fn=<CopySlices>) logpdf: -7.610964775085449
Parameters: tensor([57.3395, 18.1507], grad_fn=<CopySlices>) logpdf: -6.106584072113037
Parameters: tensor([58.9591, 18.9433], grad_fn=<CopySlices>) logpdf: -5.276744365692139
Parameters: tensor([60.1335, 19.6954], grad_fn=<CopySlices>) logpdf: -5.067811012268066
Parameters: tensor([60.9240, 20.3548], grad_fn=<CopySlices>) logpdf: -5.154724597930908
Parameters: tensor([61.4568, 20.8947], grad_fn=<CopySlices>) logpdf: -5.349027633666992
Parameters: tensor([61.8257, 21.3061], grad_fn=<CopySlices>) logpdf: -5.5606369972229
Parameters: tensor([62.0895, 21.5957], grad_fn=<CopySlices>) logpdf: -5.747973442077637
Parameters: tensor([61.5651, 18.5663], grad_fn=<CopySlices>) logpdf: -5.5072784423828125
Parameters: tensor([61.9546, 16.9894], grad_fn=<CopySlices>) logpdf: -6.345172882080078
Parameters: tensor([62.2009, 16.2738], grad_fn=<CopySlices>) logpdf: -6.929638385772705
Parameters: tensor([62.3646, 16.5304], grad_fn=<CopySlices>) logpdf: -6.819708824157715
Parameters: tensor([62.4790, 17.7073], grad_fn=<CopySlices>) logpdf: -6.196922302246094
Parameters: tensor([62.5632, 19.4676], grad_fn=<CopySlices>) logpdf: -5.742120265960693
Parameters: tensor([62.6295, 21.0293], grad_fn=<CopySlices>) logpdf: -5.8541340827941895
Parameters: tensor([62.6851, 22.0048], grad_fn=<CopySlices>) logpdf: -6.179637432098389
Parameters: tensor([62.7336, 22.5538], grad_fn=<CopySlices>) logpdf: -6.456192493438721
Parameters: tensor([62.7769, 22.8654], grad_fn=<CopySlices>) logpdf: -6.648891448974609
Parameters: tensor([62.8156, 23.0416], grad_fn=<CopySlices>) logpdf: -6.7746663093566895
Parameters: tensor([62.8504, 23.1317], grad_fn=<CopySlices>) logpdf: -6.849977016448975
Parameters: tensor([62.8816, 23.1595], grad_fn=<CopySlices>) logpdf: -6.88533878326416
Parameters: tensor([62.9095, 23.1365], grad_fn=<CopySlices>) logpdf: -6.887068748474121
Parameters: tensor([62.9345, 23.0683], grad_fn=<CopySlices>) logpdf: -6.85927677154541
Parameters: tensor([62.9566, 22.9573], grad_fn=<CopySlices>) logpdf: -6.805470943450928
Parameters: tensor([62.9762, 22.8059], grad_fn=<CopySlices>) logpdf: -6.729840278625488
Parameters: tensor([62.9934, 22.6176], grad_fn=<CopySlices>) logpdf: -6.63796854019165
Parameters: tensor([63.0085, 22.3980], grad_fn=<CopySlices>) logpdf: -6.536852836608887
Parameters: tensor([63.0215, 22.1549], grad_fn=<CopySlices>) logpdf: -6.434106826782227
Parameters: tensor([63.0329, 21.8978], grad_fn=<CopySlices>) logpdf: -6.336756706237793
Parameters: tensor([63.0426, 21.6361], grad_fn=<CopySlices>) logpdf: -6.250203609466553
Parameters: tensor([63.0510, 21.3783], grad_fn=<CopySlices>) logpdf: -6.1775898933410645
Parameters: tensor([63.0582, 21.1302], grad_fn=<CopySlices>) logpdf: -6.119723796844482
Parameters: tensor([63.0643, 20.8937], grad_fn=<CopySlices>) logpdf: -6.075638771057129
Parameters: tensor([63.0696, 20.6674], grad_fn=<CopySlices>) logpdf: -6.04355001449585
Parameters: tensor([63.0742, 20.4470], grad_fn=<CopySlices>) logpdf: -6.021770477294922
Parameters: tensor([63.0781, 20.2271], grad_fn=<CopySlices>) logpdf: -6.009363174438477
Parameters: tensor([63.0815, 20.0032], grad_fn=<CopySlices>) logpdf: -6.006298065185547
...
Parameters: tensor([63.1067, 21.3486], grad_fn=<CopySlices>) logpdf: -6.203779220581055
Parameters: tensor([63.1067, 21.3584], grad_fn=<CopySlices>) logpdf: -6.206433296203613
Parameters: tensor([63.1067, 21.3613], grad_fn=<CopySlices>) logpdf: -6.207237720489502
Parameters: tensor([63.1067, 21.3648], grad_fn=<CopySlices>) logpdf: -6.208197593688965
Parameters: tensor([63.1067, 21.3809], grad_fn=<CopySlices>) logpdf: -6.212608814239502
Parameters: tensor([63.1067, 21.4843], grad_fn=<CopySlices>) logpdf: -6.242234230041504
Parameters: tensor([63.1067, 21.9276], grad_fn=<CopySlices>) logpdf: -6.393496513366699
Warmup: 1%| | 20/2500 [00:02, 7.11it/s, step size=2.94e+00, acc. prob=0.791]Parameters: tensor([63.1063, 24.7035], grad_fn=<CopySlices>) logpdf: -8.233990669250488
Parameters: tensor([63.1055, 24.7031], grad_fn=<CopySlices>) logpdf: -8.233113288879395
Parameters: tensor([63.1027, 24.7022], grad_fn=<CopySlices>) logpdf: -8.230559349060059
Parameters: tensor([63.1067, 24.6969], grad_fn=<CopySlices>) logpdf: -8.227944374084473
Parameters: tensor([63.1067, 24.6268], grad_fn=<CopySlices>) logpdf: -8.16263484954834
Parameters: tensor([63.1067, 24.2199], grad_fn=<CopySlices>) logpdf: -7.80264949798584
Parameters: tensor([63.1067, 23.3164], grad_fn=<CopySlices>) logpdf: -7.121757984161377
Parameters: tensor([63.0928, 24.7001], grad_fn=<CopySlices>) logpdf: -8.222328186035156
Parameters: tensor([63.0488, 24.6922], grad_fn=<CopySlices>) logpdf: -8.187959671020508
Parameters: tensor([62.6789, 24.6165], grad_fn=<CopySlices>) logpdf: -7.905611038208008
Parameters: tensor([19.5507, 16.0417], grad_fn=<CopySlices>) logpdf: -170.23828125
Parameters: tensor([63.1067, 24.6826], grad_fn=<CopySlices>) logpdf: -8.214599609375
Parameters: tensor([63.1067, 23.0024], grad_fn=<CopySlices>) logpdf: -6.923335552215576
Parameters: tensor([63.1067, 22.0647], grad_fn=<CopySlices>) logpdf: -6.448219299316406
...
Parameters: tensor([63.1067, 14.8760], grad_fn=<CopySlices>) logpdf: -8.647482872009277
Parameters: tensor([63.1067, 19.4855], grad_fn=<CopySlices>) logpdf: -6.0483927726745605
Warmup: 1%| | 31/2500 [00:07, 3.17it/s, step size=1.82e+01, acc. prob=0.815]Parameters: tensor([63.1067, 19.6790], grad_fn=<CopySlices>) logpdf: -6.032225131988525
Parameters: tensor([63.1067, 21.3643], grad_fn=<CopySlices>) logpdf: -6.2080535888671875
Parameters: tensor([63.1067, 21.3643], grad_fn=<CopySlices>) logpdf: -6.2080535888671875
Parameters: tensor([63.1067, 21.3643], grad_fn=<CopySlices>) logpdf: -6.2080535888671875
Parameters: tensor([63.1067, 21.3643], grad_fn=<CopySlices>) logpdf: -6.2080535888671875
Parameters: tensor([63.1067, 21.3643], grad_fn=<CopySlices>) logpdf: -6.2080535888671875
Parameters: tensor([63.1067, 21.3643], grad_fn=<CopySlices>) logpdf: -6.2080535888671875
Parameters: tensor([63.1067, 19.4855], grad_fn=<CopySlices>) logpdf: -6.0483927726745605
Parameters: tensor([63.1067, 19.4853], grad_fn=<CopySlices>) logpdf: -6.04841423034668
Parameters: tensor([63.1067, 14.3368], grad_fn=<CopySlices>) logpdf: -9.229097366333008
Parameters: tensor([63.1067, 12.3104], grad_fn=<CopySlices>) logpdf: -11.934846878051758
Warmup: 1%|▏ | 32/2500 [00:07, 3.87it/s, step size=1.92e+01, acc. prob=0.816]Parameters: tensor([63.1067, 21.3643], grad_fn=<CopySlices>) logpdf: -6.2080535888671875
Parameters: tensor([63.1067, 21.3643], grad_fn=<CopySlices>) logpdf: -6.2080535888671875
Parameters: tensor([63.1067, 21.3643], grad_fn=<CopySlices>) logpdf: -6.2080535888671875
Parameters: tensor([63.1067, 21.3643], grad_fn=<CopySlices>) logpdf: -6.2080535888671875
...
Parameters: tensor([63.1067, 21.3643], grad_fn=<CopySlices>) logpdf: -6.2080535888671875
Parameters: tensor([63.1067, 21.3643], grad_fn=<CopySlices>) logpdf: -6.2080535888671875
Parameters: tensor([63.1067, 21.3643], grad_fn=<CopySlices>) logpdf: -6.2080535888671875
Parameters: tensor([63.1067, 21.3643], grad_fn=<CopySlices>) logpdf: -6.2080535888671875
Parameters: tensor([63.1067, 21.3643], grad_fn=<CopySlices>) logpdf: -6.2080535888671875
Parameters: tensor([63.1067, 21.3643], grad_fn=<CopySlices>) logpdf: -6.2080535888671875
Parameters: tensor([63.1067, 21.3643], grad_fn=<CopySlices>) logpdf: -6.2080535888671875
Parameters: tensor([63.1067, 21.3643], grad_fn=<CopySlices>) logpdf: -6.2080535888671875
Parameters: tensor([63.1067, 21.3643], grad_fn=<CopySlices>) logpdf: -6.2080535888671875
Parameters: tensor([63.1067, 21.3643], grad_fn=<CopySlices>) logpdf: -6.2080535888671875
Parameters: tensor([63.1067, 21.3643], grad_fn=<CopySlices>) logpdf: -6.2080535888671875
Warmup: 3%|▎ | 79/2500 [03:57, 10.34s/it, step size=3.43e+01, acc. prob=0.812]Parameters: tensor([63.1067, 21.3643], grad_fn=<CopySlices>) logpdf: -6.2080535888671875
Parameters: tensor([63.1067, 21.3643], grad_fn=<CopySlices>) logpdf: -6.2080535888671875
Parameters: tensor([63.1067, 21.3643], grad_fn=<CopySlices>) logpdf: -6.2080535888671875
Parameters: tensor([63.1067, 21.3643], grad_fn=<CopySlices>) logpdf: -6.2080535888671875
Parameters: tensor([63.1067, 21.3643], grad_fn=<CopySlices>) logpdf: -6.2080535888671875
Parameters: tensor([63.1067, 21.3643], grad_fn=<CopySlices>) logpdf: -6.2080535888671875
Parameters: tensor([63.1067, 21.3643], grad_fn=<CopySlices>) logpdf: -6.2080535888671875
Parameters: tensor([63.1067, 21.3643], grad_fn=<CopySlices>) logpdf: -6.2080535888671875
Parameters: tensor([63.1067, 21.3643], grad_fn=<CopySlices>) logpdf: -6.2080535888671875
Parameters: tensor([63.1067, 21.3643], grad_fn=<CopySlices>) logpdf: -6.2080535888671875
Parameters: tensor([63.1067, 21.3643], grad_fn=<CopySlices>) logpdf: -6.2080535888671875
Parameters: tensor([63.1067, 21.3643], grad_fn=<CopySlices>) logpdf: -6.2080535888671875
Parameters: tensor([63.1067, 21.3643], grad_fn=<CopySlices>) logpdf: -6.2080535888671875
Parameters: tensor([63.1067, 21.3643], grad_fn=<CopySlices>) logpdf: -6.2080535888671875
Parameters: tensor([63.1067, 21.3643], grad_fn=<CopySlices>) logpdf: -6.2080535888671875
Parameters: tensor([63.1067, 21.3643], grad_fn=<CopySlices>) logpdf: -6.2080535888671875
Parameters: tensor([63.1067, 21.3643], grad_fn=<CopySlices>) logpdf: -6.2080535888671875
Parameters: tensor([63.1067, 21.3643], grad_fn=<CopySlices>) logpdf: -6.2080535888671875
Parameters: tensor([63.1067, 21.3643], grad_fn=<CopySlices>) logpdf: -6.2080535888671875
Parameters: tensor([63.1067, 21.3643], grad_fn=<CopySlices>) logpdf: -6.2080535888671875
Parameters: tensor([63.1067, 21.3643], grad_fn=<CopySlices>) logpdf: -6.2080535888671875
Parameters: tensor([63.1067, 21.3643], grad_fn=<CopySlices>) logpdf: -6.2080535888671875
Parameters: tensor([63.1067, 21.3643], grad_fn=<CopySlices>) logpdf: -6.2080535888671875
Parameters: tensor([63.1067, 21.3643], grad_fn=<CopySlices>) logpdf: -6.2080535888671875
Parameters: tensor([63.1067, 21.3643], grad_fn=<CopySlices>) logpdf: -6.2080535888671875
Parameters: tensor([63.1067, 22.9785], grad_fn=<CopySlices>) logpdf: -6.909046173095703
Parameters: tensor([63.1067, 22.9785], grad_fn=<CopySlices>) logpdf: -6.909046173095703
Parameters: tensor([63.1067, 22.9785], grad_fn=<CopySlices>) logpdf: -6.909046173095703
Parameters: tensor([63.1067, 22.9785], grad_fn=<CopySlices>) logpdf: -6.909046173095703
Parameters: tensor([63.1067, 22.9785], grad_fn=<CopySlices>) logpdf: -6.909046173095703
...
Parameters: tensor([63.1067, 11.3613], grad_fn=<CopySlices>) logpdf: -13.484560012817383
Parameters: tensor([63.1067, 8.2820], grad_fn=<CopySlices>) logpdf: -19.75299072265625
Parameters: tensor([63.1067, 8.2820], grad_fn=<CopySlices>) logpdf: -19.75299072265625
Parameters: tensor([63.1067, 8.2820], grad_fn=<CopySlices>) logpdf: -19.75299072265625
Parameters: tensor([63.1067, 8.2820], grad_fn=<CopySlices>) logpdf: -19.75299072265625
Parameters: tensor([63.1067, 8.2820], grad_fn=<CopySlices>) logpdf: -19.75299072265625
Parameters: tensor([-40.8808, -14.7086], grad_fn=<CopySlices>) logpdf: -1143.2193603515625
Warmup: 4%|▍ | 105/2500 [07:17, 2.98s/it, step size=1.95e+01, acc. prob=0.802]Parameters: tensor([63.1067, 19.4855], grad_fn=<CopySlices>) logpdf: -6.0483927726745605
Parameters: tensor([63.1067, 21.3643], grad_fn=<CopySlices>) logpdf: -6.2080535888671875
Parameters: tensor([63.1067, 21.3643], grad_fn=<CopySlices>) logpdf: -6.2080535888671875
Parameters: tensor([63.1067, 21.3643], grad_fn=<CopySlices>) logpdf: -6.2080535888671875
Parameters: tensor([63.1067, 21.3643], grad_fn=<CopySlices>) logpdf: -6.2080535888671875
Parameters: tensor([63.1067, 21.3643], grad_fn=<CopySlices>) logpdf: -6.2080535888671875
Parameters: tensor([63.1067, 21.3643], grad_fn=<CopySlices>) logpdf: -6.2080535888671875
Parameters: tensor([63.1067, 19.4855], grad_fn=<CopySlices>) logpdf: -6.0483927726745605
Parameters: tensor([63.1067, 19.4855], grad_fn=<CopySlices>) logpdf: -6.0483927726745605
...
Parameters: tensor([63.1067, 19.4855], grad_fn=<CopySlices>) logpdf: -6.0483927726745605
Parameters: tensor([63.1067, 19.4855], grad_fn=<CopySlices>) logpdf: -6.0483927726745605
Parameters: tensor([63.1067, 19.4855], grad_fn=<CopySlices>) logpdf: -6.0483927726745605
Parameters: tensor([63.1067, 19.4855], grad_fn=<CopySlices>) logpdf: -6.0483927726745605
Parameters: tensor([63.1067, 19.4855], grad_fn=<CopySlices>) logpdf: -6.0483927726745605
Parameters: tensor([63.1067, 19.4855], grad_fn=<CopySlices>) logpdf: -6.0483927726745605
Parameters: tensor([63.1067, 19.4855], grad_fn=<CopySlices>) logpdf: -6.0483927726745605
Warmup: 5%|▌ | 133/2500 [13:55, 13.41s/it, step size=2.12e+01, acc. prob=0.800]Parameters: tensor([63.1067, 19.4855], grad_fn=<CopySlices>) logpdf: -6.0483927726745605
Parameters: tensor([63.1067, 19.4855], grad_fn=<CopySlices>) logpdf: -6.0483927726745605
Parameters: tensor([63.1067, 19.4855], grad_fn=<CopySlices>) logpdf: -6.0483927726745605
Parameters: tensor([63.1067, 19.4855], grad_fn=<CopySlices>) logpdf: -6.0483927726745605
Parameters: tensor([63.1067, 19.4855], grad_fn=<CopySlices>) logpdf: -6.0483927726745605
Parameters: tensor([63.1067, 19.4855], grad_fn=<CopySlices>) logpdf: -6.0483927726745605
Parameters: tensor([63.1067, 19.4855], grad_fn=<CopySlices>) logpdf: -6.0483927726745605
Parameters: tensor([63.1067, 19.4855], grad_fn=<CopySlices>) logpdf: -6.0483927726745605
...
Parameters: tensor([63.1067, 24.7042], grad_fn=<CopySlices>) logpdf: -8.234880447387695
Parameters: tensor([63.1067, 24.7042], grad_fn=<CopySlices>) logpdf: -8.234880447387695
Parameters: tensor([63.1067, 24.7042], grad_fn=<CopySlices>) logpdf: -8.234880447387695
Parameters: tensor([63.1067, 24.7042], grad_fn=<CopySlices>) logpdf: -8.234880447387695
Parameters: tensor([-40.8808, 3.8161], grad_fn=<CopySlices>) logpdf: -1048.9425048828125
Warmup: 9%|▉ | 233/2500 [24:50, 4.69s/it, step size=8.35e-03, acc. prob=0.785]Parameters: tensor([63.1067, 21.3643], grad_fn=<CopySlices>) logpdf: -6.2080535888671875
Parameters: tensor([63.1067, 21.3643], grad_fn=<CopySlices>) logpdf: -6.2080535888671875
Parameters: tensor([63.1067, 21.3643], grad_fn=<CopySlices>) logpdf: -6.2080535888671875
Parameters: tensor([63.1067, 21.3643], grad_fn=<CopySlices>) logpdf: -6.2080535888671875
Parameters: tensor([63.1067, 21.3643], grad_fn=<CopySlices>) logpdf: -6.2080535888671875
Parameters: tensor([63.1067, 21.3643], grad_fn=<CopySlices>) logpdf: -6.2080535888671875
Parameters: tensor([63.1067, 21.3643], grad_fn=<CopySlices>) logpdf: -6.2080535888671875
...
Parameters: tensor([63.1067, 19.4855], grad_fn=<CopySlices>) logpdf: -6.0483927726745605
Parameters: tensor([63.1067, 19.4855], grad_fn=<CopySlices>) logpdf: -6.0483927726745605
Parameters: tensor([63.1067, 19.4855], grad_fn=<CopySlices>) logpdf: -6.0483927726745605
Parameters: tensor([63.1067, 19.4855], grad_fn=<CopySlices>) logpdf: -6.0483927726745605
Parameters: tensor([63.1067, 19.4855], grad_fn=<CopySlices>) logpdf: -6.0483927726745605
Parameters: tensor([63.1067, 19.4855], grad_fn=<CopySlices>) logpdf: -6.0483927726745605
Parameters: tensor([63.1067, 19.4855], grad_fn=<CopySlices>) logpdf: -6.0483927726745605
Warmup: 19%|█▉ | 478/2500 [58:48, 8.80s/it, step size=1.26e-04, acc. prob=0.773]Parameters: tensor([63.1067, 19.4855], grad_fn=<CopySlices>) logpdf: -6.0483927726745605
Parameters: tensor([63.1067, 19.4855], grad_fn=<CopySlices>) logpdf: -6.0483927726745605
Parameters: tensor([63.1067, 19.4855], grad_fn=<CopySlices>) logpdf: -6.0483927726745605
Parameters: tensor([63.1067, 19.4855], grad_fn=<CopySlices>) logpdf: -6.0483927726745605
Parameters: tensor([63.1067, 19.4855], grad_fn=<CopySlices>) logpdf: -6.0483927726745605
Parameters: tensor([63.1067, 19.4855], grad_fn=<CopySlices>) logpdf: -6.0483927726745605
Parameters: tensor([63.1067, 19.4855], grad_fn=<CopySlices>) logpdf: -6.0483927726745605
Parameters: tensor([63.1067, 19.4855], grad_fn=<CopySlices>) logpdf: -6.0483927726745605
Parameters: tensor([63.1067, 19.4855], grad_fn=<CopySlices>) logpdf: -6.0483927726745605
Parameters: tensor([63.1067, 19.4855], grad_fn=<CopySlices>) logpdf: -6.0483927726745605
Parameters: tensor([63.1067, 19.4855], grad_fn=<CopySlices>) logpdf: -6.0483927726745605
Parameters: tensor([63.1067, 19.4855], grad_fn=<CopySlices>) logpdf: -6.0483927726745605
Parameters: tensor([63.1067, 19.4855], grad_fn=<CopySlices>) logpdf: -6.0483927726745605
Parameters: tensor([63.1067, 19.4855], grad_fn=<CopySlices>) logpdf: -6.0483927726745605
...
Parameters: tensor([63.1067, 21.3643], grad_fn=<CopySlices>) logpdf: -6.2080535888671875
Parameters: tensor([63.1067, 21.3643], grad_fn=<CopySlices>) logpdf: -6.2080535888671875
Parameters: tensor([63.1067, 21.3643], grad_fn=<CopySlices>) logpdf: -6.2080535888671875
Parameters: tensor([63.1067, 21.3643], grad_fn=<CopySlices>) logpdf: -6.2080535888671875
Parameters: tensor([63.1067, 21.3643], grad_fn=<CopySlices>) logpdf: -6.2080535888671875
Parameters: tensor([63.1067, 21.3643], grad_fn=<CopySlices>) logpdf: -6.2080535888671875
Parameters: tensor([63.1067, 21.3643], grad_fn=<CopySlices>) logpdf: -6.2080535888671875
Sample: 27%|██▋ | 678/2500 [1:28:36, 8.28s/it, step size=2.02e-04, acc. prob=0.871]Parameters: tensor([63.1067, 21.3643], grad_fn=<CopySlices>) logpdf: -6.2080535888671875
Parameters: tensor([63.1067, 21.3643], grad_fn=<CopySlices>) logpdf: -6.2080535888671875
Parameters: tensor([63.1067, 21.3643], grad_fn=<CopySlices>) logpdf: -6.2080535888671875
Parameters: tensor([63.1067, 21.3643], grad_fn=<CopySlices>) logpdf: -6.2080535888671875
Parameters: tensor([63.1067, 21.3643], grad_fn=<CopySlices>) logpdf: -6.2080535888671875
...
Parameters: tensor([63.1067, 22.9785], grad_fn=<CopySlices>) logpdf: -6.909046173095703
Parameters: tensor([63.1067, 22.9785], grad_fn=<CopySlices>) logpdf: -6.909046173095703
Parameters: tensor([63.1067, 22.9785], grad_fn=<CopySlices>) logpdf: -6.909046173095703
Parameters: tensor([63.1067, 22.9785], grad_fn=<CopySlices>) logpdf: -6.909046173095703
Parameters: tensor([63.1067, 22.9785], grad_fn=<CopySlices>) logpdf: -6.909046173095703
Parameters: tensor([63.1067, 22.9785], grad_fn=<CopySlices>) logpdf: -6.909046173095703
Sample: 33%|███▎ | 831/2500 [1:49:47, 7.81s/it, step size=2.02e-04, acc. prob=0.872]Parameters: tensor([63.1067, 22.9785], grad_fn=<CopySlices>) logpdf: -6.909046173095703
Parameters: tensor([63.1067, 22.9785], grad_fn=<CopySlices>) logpdf: -6.909046173095703
Parameters: tensor([63.1067, 22.9785], grad_fn=<CopySlices>) logpdf: -6.909046173095703
Parameters: tensor([63.1067, 22.9785], grad_fn=<CopySlices>) logpdf: -6.909046173095703
Parameters: tensor([63.1067, 22.9785], grad_fn=<CopySlices>) logpdf: -6.909046173095703
Parameters: tensor([63.1067, 22.9785], grad_fn=<CopySlices>) logpdf: -6.909046173095703
Parameters: tensor([63.1067, 22.9785], grad_fn=<CopySlices>) logpdf: -6.909046173095703
Parameters: tensor([63.1067, 22.9785], grad_fn=<CopySlices>) logpdf: -6.909046173095703
Parameters: tensor([63.1067, 22.9785], grad_fn=<CopySlices>) logpdf: -6.909046173095703
At first the sampling seems to work well, updating all the parameters, but quite quickly it seems to get stuck on the first paramater, while the second one varies (albeit slowly). The first parameter sometimes makes an excursion to a very different value, but quickly jumps back.
Sampling up to about 33% of the total samples, which includes the entire warmup, has taken about 1 hour. During this, a large number of likelihood evaluations are done, more than I would expect. When I do the same sampling but with my torch-distribution model, the entire sampling is finished very quickly and accurately.