def compute_kl_divergence(self, z: Tensor, q_params: Tuple, p_params: Tuple):
        mu_q, log_var_q = q_params
        mu_p, log_var_p = p_params
        #
        # qz = -0.5 * torch.sum(1 + log_var_q + (z - mu_q) ** 2 / (2 * log_var_q.exp() + 1e-8), dim=1)
        # pz = -0.5 * torch.sum(1 + log_var_p + (z - mu_p) ** 2 / (2 * log_var_p.exp() + 1e-8), dim=1)

        kl = (log_var_p - log_var_q) + (log_var_q.exp() + (mu_q - mu_p)**2)/(2 * log_var_p.exp()) - 0.5
        kl = torch.sum(kl, dim = -1)
        return kl

compute_kl_divergence(self=LVAE(  (encoders): Sequential(    (0): EncoderBlock(      (encoder): Sequential(        (0): Conv2d(3, 32, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1))        (1): BatchNorm2d(32, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)        (2): LeakyReLU(negative_slope=0.01)      )      (encoder_mu): Linear(in_features=32768, out_features=4, bias=True)      (encoder_var): Linear(in_features=32768, out_features=4, bias=True)    )    (1): EncoderBlock(      (encoder): Sequential(        (0): Conv2d(32, 64, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1))        (1): BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)        (2): LeakyReLU(negative_slope=0.01)      )      (encoder_mu): Linear(in_features=16384, out_features=8, bias=True)      (encoder_var): Linear(in_features=16384, out_features=8, bias=True)    )    (2): EncoderBlock(      (encoder): Sequential(        (0): Conv2d(64, 128, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1))        (1): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)        (2): LeakyReLU(negative_slope=0.01)      )      (encoder_mu): Linear(in_features=8192, out_features=16, bias=True)      (encoder_var): Linear(in_features=8192, out_features=16, bias=True)    )    (3): EncoderBlock(      (encoder): Sequential(        (0): Conv2d(128, 256, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1))        (1): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)        (2): LeakyReLU(negative_slope=0.01)      )      (encoder_mu): Linear(in_features=4096, out_features=32, bias=True)      (encoder_var): Linear(in_features=4096, out_features=32, bias=True)    )    (4): EncoderBlock(      (encoder): Sequential(        (0): Conv2d(256, 512, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1))        (1): BatchNorm2d(512, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)        (2): LeakyReLU(negative_slope=0.01)      )      (encoder_mu): Linear(in_features=2048, out_features=128, bias=True)      (encoder_var): Linear(in_features=2048, out_features=128, bias=True)    )  )  (ladders): Sequential(    (0): LadderBlock(      (decode): Sequential(        (0): Linear(in_features=128, out_features=32, bias=True)        (1): BatchNorm1d(32, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)      )      (fc_mu): Linear(in_features=32, out_features=32, bias=True)      (fc_var): Linear(in_features=32, out_features=32, bias=True)    )    (1): LadderBlock(      (decode): Sequential(        (0): Linear(in_features=32, out_features=16, bias=True)        (1): BatchNorm1d(16, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)      )      (fc_mu): Linear(in_features=16, out_features=16, bias=True)      (fc_var): Linear(in_features=16, out_features=16, bias=True)    )    (2): LadderBlock(      (decode): Sequential(        (0): Linear(in_features=16, out_features=8, bias=True)        (1): BatchNorm1d(8, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)      )      (fc_mu): Linear(in_features=8, out_features=8, bias=True)      (fc_var): Linear(in_features=8, out_features=8, bias=True)    )    (3): LadderBlock(      (decode): Sequential(        (0): Linear(in_features=8, out_features=4, bias=True)        (1): BatchNorm1d(4, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)      )      (fc_mu): Linear(in_features=4, out_features=4, bias=True)      (fc_var): Linear(in_features=4, out_features=4, bias=True)    )  )  (decoder_input): Linear(in_features=4, out_features=2048, bias=True)  (decoder): Sequential(    (0): Sequential(      (0): ConvTranspose2d(512, 256, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), output_padding=(1, 1))      (1): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)      (2): LeakyReLU(negative_slope=0.01)    )    (1): Sequential(      (0): ConvTranspose2d(256, 128, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), output_padding=(1, 1))      (1): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)      (2): LeakyReLU(negative_slope=0.01)    )    (2): Sequential(      (0): ConvTranspose2d(128, 64, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), output_padding=(1, 1))      (1): BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)      (2): LeakyReLU(negative_slope=0.01)    )    (3): Sequential(      (0): ConvTranspose2d(64, 32, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), output_padding=(1, 1))      (1): BatchNorm2d(32, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)      (2): LeakyReLU(negative_slope=0.01)    )  )  (final_layer): Sequential(    (0): ConvTranspose2d(32, 32, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), output_padding=(1, 1))    (1): BatchNorm2d(32, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)    (2): LeakyReLU(negative_slope=0.01)    (3): Conv2d(32, 3, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))    (4): Tanh()  )), z=tensor([[ 1.0492e+00,  3.5610e-01,  3.4800e-01, -7.6946e-01,  5.0456e-01,          4.4997e-01,  6.8368e-01, -1.2261e+00, -3.5164e-01,  7.7136e-01,         -1.7564e-01, -4.4979e-01, -8.2966e-01, -5.8678e-01,  2.4957e-01,         -2.5629e+00,  5.3565e-01,  1.0180e+00, -4.4290e-01, -4.5232e-01,          5.3448e-01,  3.1787e-01, -5.6563e-01,  6.1529e-01,  1.1621e-01,         -6.4921e-01, -8.8146e-01, -1.1294e+00, -8.5021e-01, -4.6203e-01,          7.0455e-01,  1.5862e-01],        [-3.9869e-01, -1.0184e+00, -2.7088e-01,  5.7946e-02,  1.7769e-01,          1.5084e+00,  1.2587e+00,  3.9482e-01,  4.6833e-02, -1.7755e-01,         -2.1944e-01, -5.6590e-01,  1.4754e+00,  5.7245e-01,  3.8704e-01,          1.3967e+00,  9.1769e-02, -5.0956e-01,  1.0334e-01,  6.2504e-03,         -6.5241e-01,  2.2056e-01, -6.2287e-01,  5.0889e-01,  3.4512e-01,          5.9299e-02,  1.8419e-01, -1.4984e-01,  5.9479e-01,  2.6381e-01,         -6.4674e-01,  6.6535e-02],        [ 1.6105e-02,  6.8423e-01,  4.0841e-01,  4.6373e-01,  1.4848e+00,         -1.0634e+00, -3.8981e-01, -1.5101e+00, -5.6616e-01,  1.6724e+00,          1.1741e+00,  1.3648e+00, -2.0741e+00, -8.3009e-01,  4.6480e-01,         -5.4160e-01, -1.9253e-02, -2.8395e-01,  1.2840e-01,  8.2056e-01,         -4.1808e-01, -6.1131e-01,  6.5169e-01, -3.8653e-01, -1.8229e-01,         -1.2605e-01, -6.7662e-01, -6.9804e-01,  9.5970e-02,  4.5297e-01,          6.2726e-01, -1.3093e-01],        [-8.3061e-02, -1.7206e+00,  1.4300e+00,  2.3261e+00, -8.5588e-01,          1.9924e-01,  1.1734e-01,  3.6986e-01, -2.3839e-01,  4.2223e-01,          3.5183e-01,  2.8190e-01,  5.9525e-01,  3.1091e-03, -2.1501e-01,         -4.3190e-01, -3.1419e-02, -9.2065e-01, -5.4905e-01,  9.0989e-01,         -9.1608e-01,  1.7834e+00,  9.8704e-01, -3.0422e-01,  1.3916e+00,         -2.4873e+00, -7.6926e-01, -8.5761e-01,  8.0413e-04, -5.2394e-01,          7.0383e-01, -9.3539e-02],        [ 1.6609e-01,  8.3951e-01, -2.9690e-01, -7.7606e-01,  3.3385e-01,         -1.5208e+00, -6.4178e-01, -2.5036e-02,  2.2535e-01, -1.0699e+00,         -1.2749e+00,  1.3147e+00, -9.3963e-02, -9.3003e-01,  1.1022e+00,          4.9457e-01, -8.4711e-01,  2.2049e+00, -1.3553e+00,  5.6315e-01,          1.4588e-01,  2.3210e-01,  3.1917e-01,  1.0572e+00,  3.5261e-01,          8.4752e-01,  1.4379e+00,  1.3136e+00,  2.9517e-01,  3.4626e-01,          1.4738e+00,  6.8432e-01],        [ 3.8586e-01, -1.2992e+00, -2.0385e+00, -6.2823e-02, -3.8400e-01,          1.8282e-01, -1.0624e+00,  2.9180e-01,  1.2417e+00, -2.8348e-01,         -2.3175e-01,  8.3487e-01, -8.7626e-01, -1.5229e+00,  1.3352e+00,         -3.4187e-01, -1.2249e+00, -5.9187e-01,  8.8125e-01,  9.0919e-01,         -7.3183e-01, -9.8215e-01,  7.5415e-01,  9.3204e-01,  5.0093e-01,          1.6691e-01, -1.1076e+00,  2.2119e-01,  3.0071e-01,  1.1443e-01,         -1.5766e+00, -9.6750e-01],        [-2.1684e-01,  8.0150e-01, -1.4585e+00,  1.6264e+00,  1.5836e-01,         -1.1600e-02, -3.8848e-02, -1.7568e+00,  1.1209e+00, -3.1398e-01,         -6.6105e-02, -1.5564e+00, -3.6987e-03,  7.5551e-01, -9.5897e-02,          1.1116e+00, -7.3824e-01,  1.7573e-01,  5.2458e-01,  6.5020e-01,         -8.4420e-01,  6.4055e-01, -1.1601e+00,  2.7379e-01,  5.3224e-02,         -2.8865e-01,  1.0239e-01, -8.1393e-01,  1.9412e-01,  4.6842e-02,          3.8464e-02, -3.0503e-01],        [-1.5039e+00, -1.1389e+00, -7.9392e-02, -9.5466e-01,  1.7337e-01,         -4.5933e-02,  1.0399e+00, -4.0294e-01, -4.9418e-01, -1.6700e+00,          7.3878e-01, -1.6897e+00,  1.6516e-01,  6.1727e-01,  6.8918e-03,         -1.0227e+00, -2.6916e-01,  2.7889e-01, -7.6378e-01,  5.9338e-01,          6.0767e-01,  2.3859e-03, -5.9976e-01, -7.9077e-01,  6.3589e-01,          5.8386e-01,  2.5994e-01,  4.4190e-01, -8.9016e-01,  7.3479e-01,          3.1124e-01,  1.1161e+00],        [ 2.4367e-01, -4.6580e-01, -7.9474e-01, -1.6311e+00, -3.7674e-01,         -1.6845e+00,  1.7892e-01, -1.4908e+00,  1.6251e+00,  9.5199e-01,          1.4383e-01,  1.7697e+00,  2.1480e-01,  5.6614e-01, -8.9268e-01,          2.1391e-01, -1.3199e+00, -1.6114e-01, -1.6181e-01,  9.3591e-01,          7.4139e-02, -5.1023e-01, -1.8848e-03, -1.1764e-01,  3.7848e-01,          6.0670e-01, -4.6401e-01,  1.6502e+00,  1.7894e-01, -3.7892e-01,         -4.0720e-01, -9.2215e-01],        [-4.6937e-01,  6.1564e-02, -5.8118e-01, -9.2170e-01,  4.9528e-01,          6.4523e-01, -2.1491e-01,  1.6122e+00, -1.5201e-01, -4.9329e-01,          4.1729e-04, -5.6633e-01,  1.3162e+00,  7.7106e-01,  4.4658e-02,         -4.6255e-01, -6.5700e-01, -5.7506e-01, -5.9360e-01, -9.2727e-01,          3.8578e-01,  4.3926e-01, -7.2801e-01,  4.6866e-01, -3.4001e-01,          1.3895e-02, -1.5172e-02, -2.1527e+00,  5.9040e-01, -1.9958e-01,         -3.8484e-02,  1.9616e+00],        [ 1.7550e-01,  6.4912e-01,  2.3879e-01, -6.0687e-01,  9.5041e-01,         -1.1429e+00,  1.1188e-01, -1.6318e-01, -6.6988e-01,  5.6284e-01,          6.6677e-01,  8.8563e-01,  3.2948e-01, -1.9288e+00,  7.2916e-01,         -4.3402e-01,  6.3936e-01,  1.1910e+00,  1.0224e-01,  1.1843e-01,         -2.4236e-01,  5.6351e-01,  9.9980e-01,  8.2841e-01, -7.6147e-01,          5.3813e-01, -8.6261e-01,  5.5990e-01,  2.1583e-01,  2.0904e-01,          5.7173e-01,  4.3983e-01],        [-1.1488e+00, -7.8298e-01,  7.9625e-01,  1.3236e+00, -3.3738e-01,          8.9783e-02,  8.9210e-01, -2.9661e-01, -1.8207e-01, -3.4733e-02,          1.6897e+00, -1.6455e+00, -4.8313e-02,  1.1124e-01,  5.0287e-01,          6.8137e-01,  1.0303e-01, -1.3247e+00,  2.4368e-01, -3.6705e-01,         -5.2312e-01,  1.5179e-01, -6.1664e-02, -8.9141e-02,  4.3881e-01,         -1.0195e-01,  4.7663e-01, -1.3181e+00,  8.2464e-02,  1.3609e-01,          1.1265e+00,  9.6732e-01],        [ 4.3356e-01, -4.2417e-01,  6.5557e-01,  1.0553e+00, -7.0273e-01,         -2.2122e-01,  3.1400e-01, -6.4298e-01,  7.9126e-01, -1.0397e+00,         -2.1860e-01, -3.5645e-01, -4.0151e-01,  3.0011e-01, -9.7797e-01,          1.2288e+00, -1.8587e-01, -5.7614e-01,  3.4590e-01,  5.2076e-01,          3.1351e-01, -1.2009e-01,  6.7289e-01, -4.3349e-02, -1.0189e+00,         -9.4561e-02,  2.4327e-01,  1.6765e-01,  6.1471e-01, -3.1533e-01,         -1.9605e+00, -9.3129e-01],        [-3.6459e-01, -8.6998e-01, -2.4636e-01,  1.0137e+00, -7.0574e-01,          1.0308e+00,  1.3490e+00,  8.6944e-01,  7.1008e-01,  7.8880e-02,         -4.1555e-01, -1.3803e+00,  1.3235e+00, -3.0613e+00, -8.1662e-01,          6.6787e-01,  6.7684e-01, -1.4744e+00,  4.0224e-01, -5.1124e-01,          3.4403e-01,  2.8160e-01, -1.0183e-01, -1.7717e+00, -1.9260e-01,         -1.0656e-01,  3.6924e-01,  4.2252e-01, -6.5884e-01, -4.6440e-01,         -4.1441e-01,  1.1182e+00],        [-2.0767e-01,  4.3527e-01, -5.2807e-01, -4.9561e-01, -1.0668e-01,          9.7242e-02, -3.8315e-01,  2.6790e-01,  1.2652e+00,  7.6270e-01,         -1.1948e+00,  4.9210e-01, -2.5555e-01, -7.2470e-01,  1.2674e-01,          1.1739e-01, -2.4929e-01,  1.1986e+00, -1.4833e-01,  1.3081e+00,         -9.0063e-01,  5.3212e-01, -2.1193e-01, -6.3091e-02,  1.0407e+00,          1.3172e+00, -7.0995e-01,  3.8732e-01,  1.4159e+00, -2.1069e-01,         -2.6110e-01,  1.7903e+00],        [ 1.4293e+00,  1.7720e+00,  6.3775e-01, -7.2113e-01,  9.3780e-01,          5.7716e-01,  8.6313e-01,  9.5890e-02,  1.2296e+00,  1.2328e+00,          2.8172e-01,  5.7934e-01, -3.4054e-01, -7.1739e-01, -8.8640e-02,         -7.0860e-01,  1.8284e-01,  7.9017e-01,  1.2673e+00, -8.3758e-01,         -3.0844e-01, -1.2226e+00, -1.0114e+00,  7.6850e-01, -4.4555e-01,         -2.8422e-01,  1.0138e-01, -4.3638e-01, -9.7221e-01,  5.8977e-01,         -3.5204e-01, -1.6652e-01]], grad_fn=<AddBackward0>), q_params=(tensor([[ 2.6843e-01,  4.2891e-01,  8.2591e-02, -3.6066e-01, -1.2621e-01,          4.2150e-01,  5.7408e-01,  6.7022e-02,  1.6359e-01, -1.7557e-01,          2.5423e-01,  5.4667e-02, -1.9080e-01, -1.3247e-01,  8.1814e-02,          4.5451e-01, -1.4897e-01,  2.3121e-01, -3.0247e-01, -5.8109e-01,          1.9421e-01,  6.0878e-01, -3.3199e-01,  2.1623e-01, -2.8819e-02,         -1.1092e-01,  3.6186e-01, -2.5074e-01, -4.8050e-02, -5.3073e-01,         -4.2744e-02, -1.6163e-01],        [-5.3282e-01,  3.2283e-01,  1.0349e-02,  2.0459e-01,  8.1949e-02,          2.6559e-01,  1.6254e-01,  4.1052e-01, -4.0840e-01, -1.8619e-01,         -4.5023e-01, -5.0502e-01, -1.5296e-01, -2.4307e-02,  9.0333e-01,          7.2260e-02,  9.3070e-02, -2.5140e-01,  2.1263e-01,  2.1962e-01,         -5.6695e-01,  4.9642e-01, -1.8886e-01, -2.7459e-01,  8.0842e-02,          2.1836e-01, -1.9826e-01, -3.5734e-01,  3.7377e-01,  9.6380e-02,          4.7789e-01,  5.3577e-02],        [ 2.0715e-01,  4.7628e-01, -6.9531e-01,  6.2193e-01,  7.4448e-02,         -7.4038e-02,  4.3920e-01, -3.0038e-01,  2.9259e-01,  5.9711e-01,         -1.8475e-02, -6.2255e-02,  2.1225e-01, -6.4315e-01,  5.5008e-01,          2.6176e-01,  1.1509e-01, -4.5720e-01, -1.1183e-01,  5.8519e-01,         -8.3417e-01, -4.7226e-01, -1.4180e-02,  7.8158e-02, -7.6733e-01,          7.8924e-02,  5.5324e-01, -8.9502e-04,  1.9905e-01,  2.3117e-01,          9.3344e-02,  6.3038e-02],        [-3.1862e-01,  1.1521e-01, -1.1536e-03,  2.8176e-01, -1.9568e-01,         -3.2307e-01,  3.6185e-01, -3.7077e-01, -2.5471e-01,  4.1531e-01,          1.9293e-02, -1.3638e-01,  1.8472e-01, -2.5455e-01,  1.7920e-01,          1.3296e-02, -1.1135e-01, -2.1332e-01,  1.0415e-02,  5.6922e-01,         -7.3407e-01, -1.6132e-01,  6.2709e-02, -2.7637e-01,  4.4312e-01,         -7.2710e-02, -3.5956e-03, -3.9867e-01,  5.2148e-01,  8.0296e-02,          4.5782e-03, -2.0358e-01],        [ 4.3229e-02,  6.7981e-02,  3.0964e-01,  2.3330e-01,  7.2412e-02,         -1.1788e-01,  3.8167e-02,  7.2635e-02,  2.5983e-01,  1.8382e-01,         -6.0200e-01,  3.5664e-01, -3.7191e-02, -2.5302e-01,  1.8994e-01,         -4.1802e-01, -3.3914e-01,  5.6398e-01, -4.8581e-01,  2.1255e-01,          1.2065e-02,  4.0673e-01,  1.5663e-02,  6.0308e-01, -2.9076e-01,          4.3388e-01,  2.5444e-01,  1.6980e-01,  3.2801e-01,  2.5237e-01,          3.7820e-01,  2.4345e-01],        [ 1.0095e-01,  5.0831e-01, -1.4042e-01,  6.4879e-01, -3.6134e-01,          4.0248e-01,  6.1330e-01, -3.2659e-01,  6.5446e-01, -1.1302e-01,          5.1846e-02, -4.8178e-01, -2.6989e-01, -2.6715e-01,  8.5617e-01,         -1.7742e-01, -2.4485e-01, -2.3175e-01,  3.2435e-01,  3.3987e-01,          6.0697e-02, -3.8795e-01,  2.9530e-01, -2.4199e-01,  1.2686e-01,          3.6530e-01, -4.7834e-01, -2.3333e-01, -1.0750e-01,  1.0724e-01,         -4.1925e-01, -3.0940e-01],        [ 3.5575e-01,  4.6197e-02, -8.7384e-02,  9.5227e-01, -3.2907e-01,          4.7508e-02,  6.2813e-01, -2.8118e-01,  6.5452e-01,  3.1834e-01,          2.9582e-01, -7.2217e-01, -8.5192e-02, -3.2076e-01,  3.6034e-01,          1.9750e-01, -2.3416e-01, -1.0711e-01, -7.6174e-03,  6.4308e-01,         -3.4218e-01, -4.1336e-01, -8.7045e-01,  3.7322e-02,  1.1201e-02,         -1.2794e-01,  1.3602e-01, -5.1229e-01, -3.6212e-01, -1.0126e-01,          2.5322e-01, -1.4406e-01],        [-1.0103e+00, -1.3577e-01, -2.0711e-01, -4.0737e-01, -4.4233e-01,          6.2289e-01,  6.4332e-01,  1.7446e-02,  6.1453e-02, -1.2828e+00,          2.6498e-01, -8.1271e-01,  1.0309e-01, -2.7984e-02,  7.7845e-01,         -7.7833e-03, -1.3751e-01,  2.4516e-02,  1.9007e-01, -4.8859e-01,         -1.6468e-01,  5.1361e-01,  1.4449e-01, -3.5435e-01, -1.3990e-01,          1.0091e+00,  8.3731e-02,  4.5081e-02,  3.4973e-01, -2.2979e-01,         -1.7152e-01,  7.7616e-01],        [ 2.1129e-01, -5.5245e-02, -8.4492e-01, -6.9865e-01,  2.0524e-02,         -2.0920e-01, -8.9542e-01, -1.2991e+00,  6.8687e-01,  5.5909e-01,          2.6025e-01,  8.0881e-01,  1.2759e-01, -1.2772e-01, -4.7092e-01,         -5.9772e-03, -5.2702e-01, -1.8274e-01,  4.7797e-01,  7.9313e-01,          5.1988e...3240, -0.7648, -0.6015, -0.8151, -0.4982, -0.8798,         -1.1487, -0.8372, -1.2541, -0.9858, -1.2607, -0.5042, -0.3590, -1.0571,         -0.9713, -0.0032, -0.9317, -0.7459, -0.5865, -1.3219, -0.5513, -1.4929],        [-0.8125, -0.6999, -1.0202, -0.8892, -0.4391, -0.5772, -0.5881, -0.3960,         -0.5960, -0.8460, -0.4438, -0.2747, -0.6012, -0.8793, -0.4995, -0.8939,         -0.4460, -0.4526, -0.3299, -0.7795, -1.0002, -0.5195, -0.7715, -0.6960,         -0.6758, -0.6133, -0.9994, -0.5050, -0.6077, -1.0762, -0.9929, -1.0791],        [-0.4595, -0.6031, -0.6680, -0.9815, -1.3966, -0.8512, -0.2243, -0.1707,         -0.9939, -0.9934, -1.5525, -0.7070, -0.9342, -0.6143, -0.5767, -0.8928,         -0.6686, -0.6677, -0.8055, -0.6404, -0.1045, -1.3385, -1.0805, -0.5615,         -1.0264, -0.6435, -0.8604, -0.9324, -1.2286, -0.5515, -0.6568, -1.1544],        [-1.6178,  0.0062, -0.6186, -0.3875, -0.6619, -0.8442, -0.4841, -0.0512,         -0.7892, -1.0015, -1.5369, -0.9235, -0.6014, -0.7851, -0.6098, -0.6402,         -1.0012, -0.4801, -0.9112, -0.6169, -0.6435, -0.7165, -1.1739, -0.8803,         -0.8534, -0.9068, -0.7937, -0.7326, -1.2133, -1.6992, -0.2078, -1.2506],        [-1.0148, -0.7125, -1.2178, -0.6347, -0.3829, -0.2759, -0.1684, -0.5786,         -0.7998, -1.7436, -0.0715, -0.3216, -0.7360, -0.2372,  0.1350,  0.1976,         -0.6666, -0.6146, -0.8723, -0.5737, -0.7779, -0.8479, -0.2294, -1.1423,         -0.4839, -1.4074, -0.2063, -0.4961, -1.2365, -0.7331, -0.7471, -0.6075],        [-0.6706, -0.8721, -1.1204, -0.1927, -1.0197, -0.5724, -1.7530, -1.0408,         -0.1622, -0.7894, -0.4618, -0.2074, -0.8721, -1.1944, -1.3442, -0.5713,         -0.8563, -0.6873, -1.4715, -1.7556, -1.0227, -0.9026, -0.7253, -0.1810,         -1.9485, -0.3706, -0.8832, -1.0849, -0.4609, -0.5531, -0.6724, -0.2428],        [-0.9129, -0.7851, -1.0809, -1.1535, -0.9826, -0.5759, -0.8322,  0.0690,         -0.0556, -0.5553,  0.0813, -0.8019, -1.2016, -1.0213, -0.5560, -0.6024,         -1.0042, -0.8000, -0.2104, -1.1840, -0.8442, -0.5990, -0.6627, -1.5233,         -0.4695, -0.8938, -0.1992, -0.4017, -0.6667, -0.6448, -0.5297, -0.3315],        [-0.6348, -0.8977, -0.9126, -0.5692, -0.7604, -1.0858, -0.8161, -0.7978,         -0.4418, -0.8693, -0.7124, -0.5002, -0.7904, -0.3105, -0.8556, -0.5114,         -0.5912, -0.8002, -0.6855, -1.5125, -0.6664, -0.4805, -0.7482, -0.7506,         -0.9920, -0.4497, -0.5817, -0.5095, -0.7831, -0.3176, -0.8771, -0.9176],        [-0.8262, -0.6887, -0.8371, -0.6844, -0.5698, -0.8158, -0.2983, -0.4924,         -1.1983, -1.0928,  0.0156, -0.5887, -0.7270, -1.1117, -0.2815, -0.6282,         -1.2316, -0.3851, -0.5166, -0.4268, -0.8281, -1.2050, -1.0304, -0.5277,         -0.8419, -1.2710, -0.7410, -0.3498, -1.0116, -1.6920, -1.0988, -0.6487],        [-0.6685, -0.8942, -0.6950, -0.9435, -1.4545, -0.9931, -1.1607, -0.8028,         -0.4583, -0.3539, -0.6169, -0.0885, -0.6986, -1.5816, -0.9956, -0.9892,         -1.0989, -0.8823, -1.3765, -0.9299, -1.2545, -0.6788, -1.2129, -1.2454,         -0.9476,  0.1868, -0.5374, -0.4911, -0.3620, -0.8812, -0.8682, -0.7702],        [-0.9054, -0.9413, -0.6382, -0.2539, -0.8028, -1.0651, -0.8663, -0.6452,         -1.0026, -1.0156, -0.6397, -0.5658, -0.6399, -0.4125, -0.6234, -0.5334,         -0.7529, -0.7868, -0.3598, -0.8218, -0.9018, -0.8844, -0.5145, -0.4845,         -0.3309, -0.5254, -0.4093, -0.7454, -0.7520, -1.2240, -0.3017, -0.5664],        [-0.6037, -0.9647, -0.7646, -0.1672, -0.8190, -0.9321, -0.3500, -1.3295,         -0.2976, -0.6224, -0.5381, -0.1717, -0.3903, -0.9149, -0.9836, -0.5384,         -0.9174, -1.5514, -0.7042, -1.2159, -1.0645, -0.6017, -0.4737, -0.0321,         -1.2134, -0.7973, -0.3837, -0.5801, -0.8531, -0.7889, -0.5476, -0.4948],        [-0.8367, -0.6435, -0.9452, -0.1144, -0.2960, -0.9959, -0.5174, -0.6288,         -0.6258, -0.8505, -0.7759, -0.7646, -1.3753, -0.9947, -1.6677, -1.0312,         -0.3751, -0.5482, -0.2340, -0.7073, -0.8779, -0.5111, -0.9510, -0.3015,         -1.8340, -0.1750, -1.0038, -0.7030, -0.2784, -0.9087, -0.5138, -0.7711]],       grad_fn=<LogBackward0>)), p_params=(tensor([[ 3.7155e-01, -4.3857e-01, -3.1262e-02,  7.3913e-02, -4.2352e-01,          4.4062e-01,  8.3951e-01, -7.2684e-02,  8.3442e-01,  1.0024e-01,          1.8933e-01,  1.3562e-03, -1.7940e-01, -3.3441e-02,  1.3860e+00,          1.8403e-01,  8.7208e-02, -4.9570e-01, -2.3380e-01, -2.3105e-01,         -2.8545e-01,  1.0840e+00, -2.6456e-02,  6.4712e-02, -3.7585e-01,          7.6932e-01,  3.4299e-01, -4.9652e-01, -2.4441e-01, -7.5857e-01,         -2.9168e-02,  2.5749e-01],        [-1.9098e-01, -3.8921e-02, -9.2052e-03, -4.5152e-02, -1.9950e-01,          3.3162e-01,  1.0118e+00,  5.2717e-01,  4.1992e-01, -9.8829e-02,         -1.5835e-01,  2.7900e-01, -3.1675e-01, -2.6414e-02,  9.5540e-01,         -5.6962e-04, -2.5602e-02,  7.2704e-01,  5.5912e-02,  2.0996e-01,          5.9801e-02,  7.9345e-01, -2.8341e-01,  6.5636e-01, -5.2841e-02,          5.3085e-01,  4.5546e-02, -2.1680e-01,  6.1584e-01, -5.6489e-01,         -2.5681e-01,  6.6904e-01],        [-2.5363e-01,  3.1713e-01, -4.7525e-01,  4.6114e-01, -7.7235e-02,          3.3222e-01,  6.7046e-01, -5.0891e-01,  6.7065e-01,  5.2583e-01,         -8.7712e-02, -1.1298e-01,  4.0265e-01, -2.1548e-01,  1.0806e+00,         -1.2741e-02,  1.7416e-01,  1.5990e-01,  3.3585e-01,  5.0765e-01,         -1.5938e-01,  2.7454e-01, -2.3331e-01,  2.8195e-01, -3.5243e-01,          4.0333e-01,  4.6590e-01, -1.3042e-01,  6.6069e-01,  8.9632e-03,          7.1204e-02,  2.6528e-02],        [ 2.0447e-01,  7.9027e-02, -2.0345e-01,  6.0352e-01, -2.6849e-01,          3.3581e-01,  8.0607e-01, -1.2140e-01,  4.0779e-01,  4.0784e-01,          2.6764e-01,  5.5711e-02,  3.4373e-01, -3.2602e-01,  2.9976e-01,         -3.9789e-01, -6.5418e-01,  2.3866e-01, -5.3010e-02,  1.4912e-01,         -5.5589e-01,  4.9620e-01,  3.2868e-01, -1.3033e-01,  2.0107e-01,          2.1381e-01, -1.1584e-01, -4.3339e-01,  4.2351e-01,  1.1764e-02,         -4.7359e-01, -1.9953e-01],        [-2.4584e-01,  3.0635e-01, -1.5918e-01,  1.6892e-01, -2.6329e-01,         -7.0586e-02,  3.8627e-01, -7.8647e-02,  4.7765e-01,  2.4142e-02,         -1.4260e-01, -2.6729e-01,  3.8470e-01, -3.0462e-01,  2.1496e-01,         -1.1334e+00, -3.5286e-01,  1.9625e-01, -5.6780e-01,  5.2949e-01,          1.0710e-01,  2.5684e-01,  1.4093e-01,  9.9200e-01, -1.6612e-01,          5.1061e-02,  3.0739e-02, -4.8121e-02,  3.6223e-01, -5.9363e-02,          3.5244e-01,  4.6391e-01],        [-2.3028e-01,  3.4472e-01,  1.2664e-02, -2.9844e-02,  1.6721e-02,          5.2034e-01,  1.0879e+00, -2.5122e-01, -2.8738e-01, -4.6796e-01,          1.2451e-01, -1.2548e-01, -3.0970e-02, -2.3741e-01,  1.3791e+00,          4.6233e-02, -3.3199e-01, -1.6267e-01,  3.6863e-01,  1.5724e-01,          8.1263e-02,  4.2594e-01, -6.9802e-01, -2.5496e-01, -4.4072e-01,          6.2405e-01, -3.1383e-01, -4.5347e-02,  2.7434e-01,  2.3433e-02,         -3.5149e-01,  3.0546e-01],        [-3.0139e-01, -4.5495e-01, -7.5274e-01,  7.2690e-02, -4.2043e-01,          1.6330e-01,  8.5105e-01, -2.9941e-01,  6.5286e-01,  3.4638e-01,         -4.2773e-01, -4.1011e-01,  2.2038e-01, -8.7212e-01,  6.0312e-01,         -1.9230e-01, -2.8386e-01,  2.4005e-02,  3.8621e-01,  6.2326e-01,         -3.2524e-01,  3.2126e-01, -3.9810e-01, -7.9417e-02, -2.0515e-01,          3.2325e-01,  7.0399e-02, -6.3973e-01,  5.1862e-01,  1.4920e-01,         -4.8109e-01,  3.4809e-02],        [-5.7816e-01, -6.0583e-01, -6.2553e-01, -6.6401e-01, -3.4681e-01,          2.3559e-01,  1.0572e+00, -3.0073e-01,  3.2924e-01, -4.5665e-01,          2.0300e-01, -6.3600e-01,  2.1888e-01,  4.8253e-03,  5.9926e-01,          3.1334e-01, -1.6615e-01, -2.8842e-01,  1.9736e-01,  3.7178e-01,         -3.0476e-01,  4.7085e-01, -2.0583e-01,  1.5550e-01, -2.7531e-01,          3.0798e-01, -3.3144e-01,  1.0214e-01,  5.3695e-01, -6.8624e-01,         -6.8615e-01,  7.8658e-01],        [-1.6902e-02, -1.1954e-01,  2.6141e-01, -1.5949e-01, -4.3130e-01,          1.4074e-01,  8.9873e-02, -6.7052e-01,  5.1610e-01,  3.0470e-01,          1.9294e-01,  3.2080e-01, -2.2468e-01, -3.3824e-01,  2.3473e-01,          2.1272e-01, -5.6450e-01, -7.3573e-01,  9.8111e-01,  2.7690e-01,          3.1788e...01, -3.0443e-02,  6.8728e-01,          7.3285e-01, -1.7959e-01,  2.3727e-01, -4.2015e-01,  1.3964e-01,         -4.5899e-01, -3.7523e-01,  3.1942e-01,  2.8490e-01, -3.2717e-01,         -4.5387e-01,  4.6681e-01, -2.8929e-01, -6.7390e-01,  3.4843e-01,          2.8845e-02, -1.3126e-01],        [ 9.7026e-02,  8.7238e-02, -2.0883e-01,  5.6287e-01, -1.2902e-01,         -2.3623e-01, -2.5514e-01,  8.1586e-01,  2.6965e-01, -4.6877e-01,          7.7755e-01,  5.0778e-01, -2.7069e-01, -4.5677e-01, -1.4311e-01,          3.4179e-01, -2.9974e-01, -6.5292e-02,  3.8665e-01, -1.9199e-01,          1.9425e-01,  1.8200e-02, -5.0225e-01,  1.9338e-01, -5.3641e-01,          1.3582e-01, -3.5127e-01, -2.2426e-01, -7.6830e-02, -4.3840e-01,         -1.9983e-01,  2.6174e-01],        [-3.4106e-01, -2.1956e-02,  9.6135e-02, -2.1462e-01,  2.4973e-01,         -1.9285e-01, -9.4738e-02,  5.9528e-01,  4.9566e-01, -1.6952e-01,          7.2899e-01, -1.0631e-01,  2.0234e-01, -2.8748e-01, -1.2830e-01,          1.6502e-01, -3.9771e-01,  1.4409e-02,  2.8459e-01,  5.6359e-01,         -5.0010e-01, -1.3903e-01,  2.6672e-02,  4.5906e-01, -5.3651e-02,          2.0583e-02,  2.1222e-01,  2.9820e-01,  2.7267e-01,  9.0030e-02,         -7.0134e-03,  3.2642e-01],        [ 6.2409e-03,  5.1190e-01,  3.3677e-01,  2.5439e-01, -1.6498e-01,         -2.6862e-01,  2.0089e-01,  6.9821e-01, -1.4015e-01,  2.4968e-01,          7.8826e-01,  2.0731e-01,  2.6048e-01,  5.5963e-01,  2.5770e-01,          1.0976e-01, -2.2538e-01, -2.4491e-01, -2.3541e-01, -4.9775e-01,          1.3411e-01, -1.6378e-01, -2.5918e-01,  3.3844e-01, -1.4350e-01,          3.9548e-01,  7.7314e-01,  1.1819e-01, -2.7519e-02,  1.8770e-01,         -4.7934e-02, -3.4190e-01],        [-4.5655e-01,  2.2039e-01,  8.2222e-02,  8.1429e-02, -7.0395e-04,          1.5544e-01,  1.8811e-01,  8.2783e-01, -2.1842e-01, -1.8007e-01,          7.4518e-01, -8.7200e-02,  2.0725e-01, -8.8635e-02,  1.7337e-01,          3.1364e-02, -5.4536e-01,  3.5101e-01,  2.0812e-01,  5.0656e-02,         -4.0113e-01,  2.7552e-01, -1.2636e-01,  2.8102e-01, -5.4840e-01,          5.6494e-01,  1.0038e-01,  3.1343e-01,  2.1947e-01, -9.4924e-01,         -3.0503e-01, -1.8914e-01],        [-5.5193e-01,  9.5478e-02, -2.4887e-01, -6.3854e-02, -5.2108e-02,         -2.0458e-01, -2.5280e-01, -3.5917e-01,  2.6099e-02,  3.4164e-01,         -2.5518e-03,  4.0559e-01, -1.0074e-02,  4.4221e-01,  1.4110e-01,          2.0898e-01,  4.4319e-01, -5.8418e-01, -1.6651e-01, -2.0294e-01,         -2.7111e-01, -2.9944e-01, -2.1714e-01, -3.1528e-01, -8.9361e-02,          7.8964e-01,  3.9352e-02,  1.9097e-01, -9.0216e-02, -5.0898e-01,          2.5045e-01,  6.5957e-02],        [-4.4019e-01,  4.0070e-01, -4.1605e-01,  3.1862e-01, -2.6474e-01,         -5.0081e-01, -2.4702e-01, -6.6367e-02,  4.6179e-02, -1.2374e-01,          1.6033e-01,  4.0875e-01,  1.9273e-01, -3.9862e-03, -2.8623e-01,          3.6494e-01, -2.7257e-01,  1.1628e-01,  3.8091e-01, -8.2061e-02,          1.8754e-01, -4.7154e-01,  1.8292e-01,  5.7520e-01,  6.1403e-02,         -1.2655e-01,  5.3141e-01, -1.3900e-01, -3.5683e-01, -8.4190e-01,          3.6243e-01,  3.0426e-01],        [ 1.3189e-01, -5.4619e-03, -1.3713e-01,  1.7594e-01, -5.4207e-02,          4.7752e-02,  6.6166e-02,  3.6156e-01,  3.8698e-01,  1.7383e-01,         -7.3281e-02,  3.0475e-01,  5.8195e-01, -2.8267e-01, -3.3773e-01,         -7.9626e-02, -5.8350e-01,  4.6430e-02,  1.1682e-01, -2.0942e-02,         -2.7942e-02, -2.5442e-01,  2.3714e-01,  5.7733e-01, -4.1399e-01,         -6.9484e-02,  5.6015e-01,  2.3527e-01, -9.8244e-02, -6.3340e-01,         -1.1871e-01, -1.5378e-01],        [-1.0351e-01,  8.8223e-01, -7.8972e-01,  5.1950e-01,  4.5225e-01,         -1.6147e-01,  4.6845e-02,  5.5218e-01,  3.2532e-02,  1.2288e-01,          6.5254e-01,  1.7118e-02, -3.6879e-01, -1.8749e-01,  2.8955e-01,         -2.9214e-01,  3.1256e-02,  7.0640e-02,  1.1320e-01,  5.4723e-01,          3.2518e-01, -1.1582e-02, -2.8634e-01,  7.7266e-01, -6.6684e-01,          2.9278e-01,  1.3858e-01, -5.2943e-01,  1.5778e-01, -1.3674e-01,          1.1131e-01,  3.3587e-01]], grad_fn=<AddmmBackward0>)), self._backward_hooks=OrderedDict(), self._backward_pre_hooks=OrderedDict(), self._buffers=OrderedDict(), self._forward_hooks=OrderedDict(), self._forward_hooks_always_called=OrderedDict(), self._forward_hooks_with_kwargs=OrderedDict(), self._forward_pre_hooks=OrderedDict(), self._forward_pre_hooks_with_kwargs=OrderedDict(), self._is_full_backward_hook=None, self._load_state_dict_post_hooks=OrderedDict(), self._load_state_dict_pre_hooks=OrderedDict(), self._modules=OrderedDict([('encoders', Sequential(  (0): EncoderBlock(    (encoder): Sequential(      (0): Conv2d(3, 32, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1))      (1): BatchNorm2d(32, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)      (2): LeakyReLU(negative_slope=0.01)    )    (encoder_mu): Linear(in_features=32768, out_features=4, bias=True)    (encoder_var): Linear(in_features=32768, out_features=4, bias=True)  )  (1): EncoderBlock(    (encoder): Sequential(      (0): Conv2d(32, 64, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1))      (1): BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)      (2): LeakyReLU(negative_slope=0.01)    )    (encoder_mu): Linear(in_features=16384, out_features=8, bias=True)    (encoder_var): Linear(in_features=16384, out_features=8, bias=True)  )  (2): EncoderBlock(    (encoder): Sequential(      (0): Conv2d(64, 128, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1))      (1): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)      (2): LeakyReLU(negative_slope=0.01)    )    (encoder_mu): Linear(in_features=8192, out_features=16, bias=True)    (encoder_var): Linear(in_features=8192, out_features=16, bias=True)  )  (3): EncoderBlock(    (encoder): Sequential(      (0): Conv2d(128, 256, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1))      (1): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)      (2): LeakyReLU(negative_slope=0.01)    )    (encoder_mu): Linear(in_features=4096, out_features=32, bias=True)    (encoder_var): Linear(in_features=4096, out_features=32, bias=True)  )  (4): EncoderBlock(    (encoder): Sequential(      (0): Conv2d(256, 512, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1))      (1): BatchNorm2d(512, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)      (2): LeakyReLU(negative_slope=0.01)    )    (encoder_mu): Linear(in_features=2048, out_features=128, bias=True)    (encoder_var): Linear(in_features=2048, out_features=128, bias=True)  ))), ('ladders', Sequential(  (0): LadderBlock(    (decode): Sequential(      (0): Linear(in_features=128, out_features=32, bias=True)      (1): BatchNorm1d(32, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)    )    (fc_mu): Linear(in_features=32, out_features=32, bias=True)    (fc_var): Linear(in_features=32, out_features=32, bias=True)  )  (1): LadderBlock(    (decode): Sequential(      (0): Linear(in_features=32, out_features=16, bias=True)      (1): BatchNorm1d(16, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)    )    (fc_mu): Linear(in_features=16, out_features=16, bias=True)    (fc_var): Linear(in_features=16, out_features=16, bias=True)  )  (2): LadderBlock(    (decode): Sequential(      (0): Linear(in_features=16, out_features=8, bias=True)      (1): BatchNorm1d(8, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)    )    (fc_mu): Linear(in_features=8, out_features=8, bias=True)    (fc_var): Linear(in_features=8, out_features=8, bias=True)  )  (3): LadderBlock(    (decode): Sequential(      (0): Linear(in_features=8, out_features=4, bias=True)      (1): BatchNorm1d(4, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)    )    (fc_mu): Linear(in_features=4, out_features=4, bias=True)    (fc_var): Linear(in_features=4, out_features=4, bias=True)  ))), ('decoder_input', Linear(in_features=4, out_features=2048, bias=True)), ('decoder', Sequential(  (0): Sequential(    (0): ConvTranspose2d(512, 256, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), output_padding=(1, 1))    (1): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)    (2): LeakyReLU(negative_slope=0.01)  )  (1): Sequential(    (0): ConvTranspose2d(256, 128, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), output_padding=(1, 1))    (1): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)    (2): LeakyReLU(negative_slope=0.01)  )  (2): Sequential(    (0): ConvTranspose2d(128, 64, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), output_padding=(1, 1))    (1): BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)    (2): LeakyReLU(negative_slope=0.01)  )  (3): Sequential(    (0): ConvTranspose2d(64, 32, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), output_padding=(1, 1))    (1): BatchNorm2d(32, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)    (2): LeakyReLU(negative_slope=0.01)  ))), ('final_layer', Sequential(  (0): ConvTranspose2d(32, 32, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), output_padding=(1, 1))  (1): BatchNorm2d(32, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)  (2): LeakyReLU(negative_slope=0.01)  (3): Conv2d(32, 3, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))  (4): Tanh()))]), self._non_persistent_buffers_set=set(), self._parameters=OrderedDict(), self._state_dict_hooks=OrderedDict(), self._state_dict_pre_hooks=OrderedDict(), self.hidden_dims=[32, 64, 128, 256, 512], self.latent_dims=[4, 8, 16, 32, 128], self.num_rungs=5, self.training=True)


def humanize(obj, type=None, length=None):
    if obj is None:
        obj = ''
    elif type and type.startswith('time'):
        tz = type[len('time'):].lstrip('-')
        tz = timezone(tz) if tz else getattr(current_app, 'timezone', '') or utc
        obj = format_time(float(obj), tz) if obj else ''
    elif type and type.startswith('natural-time'):
        tz = type[len('natural-time'):].lstrip('-')
        tz = timezone(tz) if tz else getattr(current_app, 'timezone', '') or utc
        delta = datetime.now(tz) - datetime.fromtimestamp(float(obj), tz)
        if delta < timedelta(days=1):
            obj = naturaltime(delta)
        else:
            obj = format_time(float(obj), tz) if obj else ''
    elif isinstance(obj, str) and not re.match(UUID_REGEX, obj):
        obj = obj.replace('-', ' ').replace('_', ' ')
        obj = re.sub('|'.join(KEYWORDS_UP),
                     lambda m: m.group(0).upper(), obj)
        if obj and obj not in KEYWORDS_DOWN:
            obj = obj[0].upper() + obj[1:]
    elif isinstance(obj, list):
        if all(isinstance(x, (int, float, str)) for x in obj):
            obj = ', '.join(map(str, obj))
    if length is not None and len(obj) > length:
        obj = obj[:length - 4] + ' ...'
    return obj

humanize(obj='ssl', type=None, length=None)


def config(_config=None, **kwargs):
    """
    A decorator for setting the default kwargs of `BaseHandler.crawl`.
    Any self.crawl with this callback will use this config.
    """
    if _config is None:
        _config = {}
    _config.update(kwargs)

    def wrapper(func):
        func._config = _config
        return func
    return wrapper

config(_config=None, kwargs={'age': 864000})

<function config.<locals>.wrapper at 0x7f6a10388ee0>


def encode_z1(self, input: Tensor, z2: Tensor) -> List[Tensor]:
        x = self.embed_data(input)
        z2 = self.embed_z2_code(z2)
        z2 = z2.view(-1, self.img_size, self.img_size).unsqueeze(1)
        result = torch.cat([x, z2], dim=1)

        result = self.encoder_z1_layers(result)
        result = torch.flatten(result, start_dim=1)
        z1_mu = self.fc_z1_mu(result)
        z1_log_var = self.fc_z1_var(result)

        return [z1_mu, z1_log_var]

encode_z1(self=HVAE(  (encoder_z2_layers): Sequential(    (0): Sequential(      (0): Conv2d(3, 32, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1))      (1): BatchNorm2d(32, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)      (2): LeakyReLU(negative_slope=0.01)    )    (1): Sequential(      (0): Conv2d(32, 64, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1))      (1): BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)      (2): LeakyReLU(negative_slope=0.01)    )    (2): Sequential(      (0): Conv2d(64, 128, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1))      (1): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)      (2): LeakyReLU(negative_slope=0.01)    )    (3): Sequential(      (0): Conv2d(128, 256, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1))      (1): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)      (2): LeakyReLU(negative_slope=0.01)    )    (4): Sequential(      (0): Conv2d(256, 512, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1))      (1): BatchNorm2d(512, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)      (2): LeakyReLU(negative_slope=0.01)    )  )  (fc_z2_mu): Linear(in_features=2048, out_features=20, bias=True)  (fc_z2_var): Linear(in_features=2048, out_features=20, bias=True)  (embed_z2_code): Linear(in_features=20, out_features=4096, bias=True)  (embed_data): Conv2d(3, 3, kernel_size=(1, 1), stride=(1, 1))  (encoder_z1_layers): Sequential(    (0): Sequential(      (0): Conv2d(4, 32, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1))      (1): BatchNorm2d(32, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)      (2): LeakyReLU(negative_slope=0.01)    )    (1): Sequential(      (0): Conv2d(32, 64, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1))      (1): BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)      (2): LeakyReLU(negative_slope=0.01)    )    (2): Sequential(      (0): Conv2d(64, 128, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1))      (1): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)      (2): LeakyReLU(negative_slope=0.01)    )    (3): Sequential(      (0): Conv2d(128, 256, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1))      (1): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)      (2): LeakyReLU(negative_slope=0.01)    )    (4): Sequential(      (0): Conv2d(256, 512, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1))      (1): BatchNorm2d(512, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)      (2): LeakyReLU(negative_slope=0.01)    )  )  (fc_z1_mu): Linear(in_features=2048, out_features=10, bias=True)  (fc_z1_var): Linear(in_features=2048, out_features=10, bias=True)  (recons_z1_mu): Linear(in_features=20, out_features=10, bias=True)  (recons_z1_log_var): Linear(in_features=20, out_features=10, bias=True)  (debed_z1_code): Linear(in_features=10, out_features=1024, bias=True)  (debed_z2_code): Linear(in_features=20, out_features=1024, bias=True)  (decoder): Sequential(    (0): Sequential(      (0): ConvTranspose2d(512, 256, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), output_padding=(1, 1))      (1): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)      (2): LeakyReLU(negative_slope=0.01)    )    (1): Sequential(      (0): ConvTranspose2d(256, 128, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), output_padding=(1, 1))      (1): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)      (2): LeakyReLU(negative_slope=0.01)    )    (2): Sequential(      (0): ConvTranspose2d(128, 64, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), output_padding=(1, 1))      (1): BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)      (2): LeakyReLU(negative_slope=0.01)    )    (3): Sequential(      (0): ConvTranspose2d(64, 32, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), output_padding=(1, 1))      (1): BatchNorm2d(32, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)      (2): LeakyReLU(negative_slope=0.01)    )  )  (final_layer): Sequential(    (0): ConvTranspose2d(32, 32, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), output_padding=(1, 1))    (1): BatchNorm2d(32, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)    (2): LeakyReLU(negative_slope=0.01)    (3): Conv2d(32, 3, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))    (4): Tanh()  )), input=tensor([[[[-1.8936,  0.4196,  1.2842,  ...,  1.2066,  0.7782,  1.3469],          [-0.8224,  0.4527, -0.0577,  ...,  1.4756,  1.1761, -0.7108],          [-1.6315,  0.8043,  2.6413,  ..., -1.3240,  0.9065, -0.8693],          ...,          [ 0.0383,  1.3328, -0.1353,  ..., -1.1770, -0.1116, -0.3206],          [-1.0151,  0.2528, -0.3343,  ..., -0.0416, -0.9868,  1.1128],          [-1.0028, -1.1892,  0.7485,  ...,  0.7481,  0.0498, -0.0744]],         [[-0.2884, -0.2759,  1.1363,  ...,  1.1605,  0.0775, -1.4702],          [-1.6069, -0.0638, -0.8533,  ...,  0.2473,  1.4863,  0.0158],          [ 2.5342,  0.6854,  1.1528,  ...,  0.6568, -0.5946,  0.1834],          ...,          [ 0.3353,  0.0865, -0.9538,  ..., -1.2018, -1.4665, -0.3575],          [-0.3430, -1.4583, -0.7826,  ...,  2.1256, -0.3949,  0.1570],          [ 0.9678, -1.7589,  0.9122,  ...,  0.4558,  1.4173,  1.6013]],         [[-0.7772,  0.4630,  0.6564,  ..., -1.8964, -2.1647, -0.5534],          [ 0.4105,  0.5011,  1.2573,  ...,  0.3236,  0.9842,  1.0977],          [-0.7429,  1.0571,  0.6543,  ...,  0.3400, -0.2293, -0.5091],          ...,          [ 0.1505, -0.3082,  0.3324,  ...,  0.6619, -0.0814,  0.6934],          [-1.7772, -1.9982,  0.5367,  ...,  0.1102, -0.7138,  0.8455],          [ 0.0332, -0.3734, -1.5362,  ..., -1.2318, -0.4791, -1.6185]]],        [[[ 0.0160,  0.7455,  0.3158,  ..., -0.0860,  0.2626,  1.1479],          [-0.4146,  1.8953,  0.0897,  ..., -0.3885,  1.2116, -1.0973],          [-0.6872, -1.8162,  0.1554,  ..., -1.7179,  1.0908,  0.8081],          ...,          [ 0.1696, -1.8558,  0.1469,  ...,  0.3142,  2.3475,  0.4731],          [ 0.1529, -1.0062,  0.7995,  ...,  0.2377,  0.8177,  0.9386],          [ 0.0217, -0.4921, -0.8103,  ...,  2.6341, -0.5868, -0.0105]],         [[ 1.4296,  0.8156, -0.1442,  ..., -1.5969,  0.2655,  1.3892],          [ 0.0990, -0.1513, -0.2613,  ..., -0.5251, -0.1855, -0.1718],          [ 1.4328,  0.2132, -1.6794,  ...,  0.8488,  1.4868, -1.7160],          ...,          [-0.0693,  0.1337,  1.1090,  ..., -1.3724, -2.5672,  1.0906],          [ 0.2655,  0.3716, -0.1245,  ...,  0.7961, -0.3946,  1.0061],          [-0.8810,  0.1413, -0.6222,  ..., -0.4905, -0.3606, -1.0626]],         [[-0.0948, -0.0486,  0.0157,  ...,  2.1004, -1.5879, -0.2739],          [-0.2656,  1.1246,  1.0048,  ...,  0.4671, -0.1705, -0.7745],          [-0.3759,  0.2029, -1.7732,  ..., -0.2653, -2.3626, -1.0251],          ...,          [ 1.4900, -1.3544,  1.5717,  ..., -1.9406,  0.7142, -0.6601],          [ 0.0120,  0.9058,  0.0421,  ...,  1.5632,  1.1624,  0.1822],          [-0.9256,  0.8344, -0.9597,  ..., -0.4188,  0.2051,  0.6043]]],        [[[-0.6292,  1.5933,  1.1558,  ..., -1.0939,  0.3556, -1.9305],          [ 2.2168,  0.9184, -0.6098,  ...,  0.1250,  0.2496,  0.5268],          [ 0.6035, -0.7713,  0.4179,  ...,  0.1061,  0.2763, -1.1580],          ...,          [ 0.6361, -0.9818,  0.2838,  ..., -0.1032, -0.1063,  0.2971],          [-0.9087, -0.8842,  1.3305,  ...,  0.7932,  1.0652, -0.1426],          [-2.2427, -0.6605,  0.9667,  ..., -0.4021, -1.1495, -0.0572]],         [[-0.1344,  0.6562,  0.4687,  ...,  0.1312,  0.5327,  0.3450],          [ 0.4334,  1.3153,  1.9282,  ...,  0.5667,  1.4108,  0.4699],          [ 0.5254, -0.2920,  1.7819,  ..., -0.5157, -0.3931, -0.8093],          ...,          [-0.5848,  0.6157,  1.1588,  ...,  0.5449, -1.0721,  0.5217],          [ 0.3995,  0.2235,  0.2506,  ..., -0.3272,  0.8440,  0.4930],          [-0.8263, -0.0577, -0.9538,  ..., -1.2877,  1.6349,  1.3202]],         [[ 0.6381, -1.4398, -0.7744,  ...,  1.2140,  0.9096, -0.6753],          [ 0.4048, -2.5466,  1.1450,  ...,  0.5030,  0.4698,  0.5673],          [-0.0358,  0.2170, -0.6245,  ..., -0.4325,  0.5767, -0.2755],          ...,          [ 0.3158, -1.6521,  0.9919,  ...,  2.0221, -1.2303,  0.4039],          [ 0.2354, -0.9477, -0.6534,  ..., -0.5600, -1.3333,  0.5403],          [ 1.1120, -2.0893, -1.3755,  ...,  1.9954,  0.8662, -1.6815]]],        ...,        [[[ 1.2590,  0.1363, -0.6754,  ..., -0.8791,  1.2095, -0.1012],          [ 2.3050, -0.1425, -0.9242,  ..., -0.7649, -0.7488,  0.6949],          [ 0.4214,  0.3215, -2.3866,  ..., -0.5338,  0.4479, -0.8477],          ...,          [ 0.1499, -0.5690,  0.0180,  ...,  1.6823,  0.3056, -0.6216],          [-0.3886,  0.6260, -0.6109,  ...,  0.0346,  0.2253, -0.5103],          [-0.1228,  0.1755,  0.1834,  ..., -2.4334, -0.4735,  0.3909]],         [[-0.5463,  0.1758,  0.3594,  ..., -1.5349, -0.1570,  0.0686],          [-0.1374,  1.0209, -0.5383,  ..., -0.9182, -0.2435, -0.2757],          [ 0.6611, -0.2038, -1.1446,  ..., -1.4481,  0.6467, -0.6618],          ...,          [-0.2686,  0.0405, -0.1467,  ...,  1.0902,  0.5896, -0.7653],          [-1.9040,  0.0179,  1.1207,  ..., -0.2288, -1.6366,  1.1901],          [ 0.1832,  0.3417,  0.9626,  ...,  0.3803,  0.7350, -0.3099]],         [[-0.9969, -0.5508, -0.4998,  ...,  0.6936,  1.6136,  0.3220],          [-0.0770,  1.3169,  0.1651,  ...,  1.7485,  0.7226, -0.2574],          [ 0.0803, -0.9462,  1.2021,  ..., -0.0972,  0.0682,  0.1344],          ...,          [-1.7403,  1.7113,  3.0679,  ...,  1.0908,  1.0581, -0.5222],          [ 0.4028, -1.0059, -2.1630,  ..., -0.0682,  0.5164,  1.6635],          [ 2.7208, -0.5648, -0.1862,  ..., -1.5719, -0.3802,  0.2935]]],        [[[ 0.8409, -0.7438, -1.0032,  ...,  0.1318, -0.4320,  0.4415],          [ 1.5099, -1.1524,  1.1499,  ..., -1.6440, -0.0798,  0.6606],          [ 1.0045, -0.9537,  1.1316,  ..., -1.3674, -0.9758, -0.0078],          ...,          [ 0.3468,  0.5475, -0.7472,  ...,  1.5581,  0.2254,  0.8593],          [-0.0717,  0.4480,  1.3726,  ...,  0.6523, -1.1766, -0.3996],          [-1.6755, -0.8156,  0.5543,  ..., -1.4320,  0.4414, -0.1122]],         [[ 1.3380, -1.1875,  0.5178,  ...,  0.3197, -0.7422,  0.5158],          [-1.1908,  1.4007,  0.8123,  ..., -1.4919, -1.7273, -0.0800],          [-1.3901, -0.3755,  0.0897,  ...,  1.6764, -1.3049, -0.0079],          ...,          [-0.1568, -1.4188, -0.7429,  ..., -1.6218,  0.6604,  1.6529],          [ 0.6247,  0.6867, -1.0114,  ..., -0.0381,  0.1275, -0.8645],          [-0.0610,  0.5389,  0.3990,  ..., -1.0361, -2.4215, -0.6971]],         [[ 0.7516, -1.9676,  1.4015,  ...,  0.5336,  1.0704,  1.7422],          [-1.6988, -1.2900, -0.6327,  ..., -0.9592,  1.5238,  0.2264],          [ 1.0729,  0.8629, -0.5775,  ..., -0.7702, -0.0271,  0.7063],          ...,          [ 0.4322,  1.7422,  0.5302,  ...,  1.7000,  1.1956,  0.4742],          [ 0.4945,  0.2216, -1.3425,  ..., -0.9851,  0.1730,  1.0625],          [-0.6886, -0.1384, -0.4764,  ...,  0.3615,  0.5811,  0.4600]]],        [[[-0.8843,  0.8162, -0.5182,  ...,  0.3598, -0.5506, -0.5101],          [-0.4878, -1.6419, -0.5060,  ...,  1.8825, -0.1327,  0.3133],          [ 0.4729,  0.4339,  1.0820,  ..., -1.3299, -0.7871, -0.6630],          ...,          [-1.1407,  0.0937,  1.0086,  ...,  0.2854,  0.4308,  1.1841],          [ 0.3772, -0.8250,  1.1873,  ...,  0.1146, -0.7267,  0.4953],          [-0.3229, -1.0868, -0.0125,  ..., -0.6451,  1.2862, -1.9553]],         [[-0.4689, -0.3666, -0.3470,  ..., -0.0699, -1.9161, -0.4589],          [-0.4437,  0.9324, -2.2532,  ...,  0.1354,  1.1196, -0.0070],          [ 1.1838,  0.3169,  1.2460,  ..., -0.9694,  0.3669,  0.7385],          ...,          [-1.7229,  0.6705,  0.0683,  ...,  1.0143,  0.6204, -1.1060],          [ 0.2528, -2.3181, -0.0774,  ..., -0.3610,  0.4452, -0.3837],          [-1.2532, -0.3006,  0.6067,  ..., -0.8430, -0.5149,  0.8442]],         [[-1.8861, -0.4756,  0.9849,  ...,  0.7845, -0.8080, -0.6442],          [-0.7163,  0.8101, -0.1905,  ...,  0.3361,  0.6133, -0.1919],          [-0.7476, -0.5810, -0.1615,  ..., -0.5631,  0.0637, -0.1969],          ...,          [-0.9449, -0.9001,  1.0701,  ...,  0.4150,  0.1768, -0.4086],          [ 0.5126,  1.4135,  1.6389,  ..., -0.6361, -0.3524, -0.2547],          [ 0.0541, -1.5909, -1.5796,  ..., -0.1662, -0.7188, -0.6655]]]]), z2=tensor([[-1.2900e+00, -1.9974e+00, -1.2873e+00,  6.8312e-01,  1.1999e+00,          5.2038e-01, -1.1960e+00,  5.8112e-01,  1.0388e-01, -1.2854e-01,          4.6986e-01,  4.9946e-01,  7.0090e-01,  3.2990e-01,  6.1682e-01,          4.5016e-01,  6.5489e-01, -3.5582e-01, -5.0099e-01,  8.5103e-01],        [-6.6771e-01, -1.3980e+00, -4.8212e-01, -2.3246e-01,  5.8675e-01,         -4.5213e-01, -5.7778e-02, -9.8022e-02, -2.0276e+00, -2.1314e+00,         -6.2125e-01,  1.7824e+00, -9.2441e-02, -5.5198e-01,  3.9835e-01,         -8.2421e-02,  4.7706e-01, -7.4640e-02, -9.8138e-01,  1.1754e+00],        [-1.9242e-01,  4.4564e-01, -1.7303e-01,  1.7473e+00, -1.4152e+00,          8.4109e-01, -1.9819e+00,  2.4425e+00,  7.1755e-01, -9.0582e-01,         -5.1756e-01,  1.8689e+00, -6.7044e-01, -1.3858e+00, -1.6933e-01,         -6.0295e-01, -3.1655e-01, -9.6165e-01,  1.0204e+00, -6.7928e-01],        [-9.2453e-01,  9.0098e-01,  4.8510e-01,  9.0699e-01, -7.1865e-01,          3.9064e-01, -1.9083e+00, -1.1505e+00,  7.4294e-01, -3.6578e-02,         -5.0377e-02, -1.4724e+00,  1.4315e+00, -1.1902e-01, -2.1044e-01,         -9.7274e-02,  1.4786e+00,  5.8825e-01,  2.4738e-01,  4.7886e-01],        [-5.2584e-01, -5.9981e-02,  9.6410e-02,  1.4674e-01, -2.5624e+00,         -1.2189e+00,  3.6519e-01,  1.9240e+00,  2.7167e+00, -8.9335e-01,         -8.4352e-01,  3.2160e-01,  2.1540e+00,  1.9824e+00,  9.2087e-01,          1.2441e-01, -3.8424e-01,  1.0510e+00, -1.6387e+00, -6.6610e-01],        [ 1.9033e-02, -8.3761e-01, -1.7144e+00, -2.1722e-01,  5.7782e-01,         -8.5884e-01,  1.5352e-01, -3.2194e-02,  1.7006e+00,  2.2611e-01,         -6.6798e-01,  4.2757e-01,  1.1844e+00, -8.2032e-01,  8.5881e-01,         -1.6389e+00, -1.1470e-01,  4.3548e-01, -4.9292e-01, -1.4239e+00],        [-1.8718e-03,  5.0300e-01,  9.4769e-01,  1.3772e-01,  1.2630e+00,          4.9913e-01, -1.8855e+00, -3.6696e-01, -2.0715e-01, -1.8160e-01,          2.6803e-01, -1.7591e-01, -1.1231e+00,  2.9996e-01,  3.0419e-01,          3.2485e-01, -7.8852e-01, -1.3825e+00,  1.5446e+00, -1.5957e+00],        [ 1.2224e+00,  5.4267e-02, -2.8773e-01, -7.6571e-01,  1.3390e-01,          6.8962e-01,  1.7844e-01, -3.5639e-01, -4.0127e-02, -9.6210e-01,         -5.4299e-01,  5.6972e-01,  1.4236e+00, -4.4062e-01,  1.2558e+00,          9.4424e-01,  7.9834e-01, -1.9353e+00,  2.2831e-02,  1.1698e+00],        [ 3.0282e-01,  4.6073e-01, -1.0822e+00, -3.9287e-01, -5.2540e-01,         -6.2057e-01, -1.0958e+00, -1.3846e-01,  9.9414e-01,  1.3613e+00,         -1.3443e+00,  4.5995e-01,  7.6624e-01, -1.8855e+00,  4.2138e-01,          8.1800e-02,  1.0457e+00, -1.3314e+00, -1.4370e+00, -2.2902e-02],        [-1.2029e+00, -4.5437e-01,  2.1817e-01,  5.0700e-01,  2.3848e-01,         -1.5998e+00,  3.1236e+00,  3.2451e-01,  1.0552e+00, -1.3499e-01,         -2.4435e+00,  6.1070e-01,  1.7400e+00, -8.0414e-01, -9.5173e-01,         -3.1292e-01,  2.3043e+00, -1.5358e+00, -1.0775e-01, -1.1630e+00],        [-1.1019e+00,  1.6819e+00, -4.5248e-01,  8.8460e-01, -1.1410e-01,         -1.0526e+00, -8.9691e-01,  4.4700e-01,  3.9597e-01, -8.3095e-01,         -2.4551e+00,  1.1435e-01, -2.9407e-01, -1.2293e+00, -2.8295e+00,         -3.0189e-01,  1.6674e-02, -1.5991e+00,  1.5892e-01, -4.5429e-01],        [ 1.5585e+00, -1.6472e-02, -1.7998e-01, -7.0806e-01, -1.9840e+00,         -5.5717e-01,  7.8396e-01,  4.3221e-01,  1.9304e-02, -8.3582e-01,          3.1031e-01, -4.0005e-01,  2.2043e-01,  4.4766e-01,  1.3857e-01,         -1.0083e+00,  5.1706e-02, -1.2183e+00, -1.8305e-01, -8.0962e-01],        [ 1.1933e+00, -1.9682e-01,  3.0758e-01, -9.4026e-01, -1.5966e-01,          1.2627e+00,  9.4436e-01,  2.0236e-01, -1.1885e+00,  6.8988e-01,         -1.0912e+00, -6.8157e-02,  1.9551e+00, -1.6896e+00, -2.6537e-01,         -1.5902e+00,  1.8715e-02, -1.7566e+00, -4.4485e-01, -2.9117e-01],        [-2.2808e+00, -1.3932e+00, -2.1048e-01, -2.3856e+00,  3.1914e-01,         -6.4313e-01, -8.6689e-01, -1.2414e+00, -9.7393e-01, -1.1433e+00,          1.5302e-01,  6.6312e-01, -1.9848e-01, -1.2353e+00,  2.5797e-01,         -6.6730e-01,  2.6706e-01, -2.6511e+00, -1.1872e+00, -1.0793e+00],        [-9.9676e-01,  4.2526e-01,  1.8178e+00, -9.1751e-03,  8.7009e-01,         -3.2026e-01, -1.0095e+00,  3.5825e-01,  8.4667e-01, -2.8318e-02,          4.1016e-01, -1.4537e+00,  3.3764e+00, -1.7832e+00, -1.0972e+00,          3.9235e-01,  4.3836e-01,  1.4538e-01, -1.1909e+00,  9.7822e-01],        [ 1.2616e+00, -1.4657e-01, -2.5914e+00, -7.2625e-01,  1.2653e+00,         -2.3051e+00,  1.6718e-01, -5.7320e-01, -2.1863e-01, -1.9877e+00,         -1.3305e+00, -1.1724e-01,  1.8090e+00, -5.3239e-01,  2.1936e-01,         -2.3490e+00, -1.7993e+00, -2.7736e+00, -2.0880e-01,  1.0949e+00]],       grad_fn=<AddBackward0>), self._backward_hooks=OrderedDict(), self._backward_pre_hooks=OrderedDict(), self._buffers=OrderedDict(), self._forward_hooks=OrderedDict(), self._forward_hooks_always_called=OrderedDict(), self._forward_hooks_with_kwargs=OrderedDict(), self._forward_pre_hooks=OrderedDict(), self._forward_pre_hooks_with_kwargs=OrderedDict(), self._is_full_backward_hook=None, self._load_state_dict_post_hooks=OrderedDict(), self._load_state_dict_pre_hooks=OrderedDict(), self._modules=OrderedDict([('encoder_z2_layers', Sequential(  (0): Sequential(    (0): Conv2d(3, 32, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1))    (1): BatchNorm2d(32, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)    (2): LeakyReLU(negative_slope=0.01)  )  (1): Sequential(    (0): Conv2d(32, 64, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1))    (1): BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)    (2): LeakyReLU(negative_slope=0.01)  )  (2): Sequential(    (0): Conv2d(64, 128, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1))    (1): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)    (2): LeakyReLU(negative_slope=0.01)  )  (3): Sequential(    (0): Conv2d(128, 256, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1))    (1): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)    (2): LeakyReLU(negative_slope=0.01)  )  (4): Sequential(    (0): Conv2d(256, 512, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1))    (1): BatchNorm2d(512, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)    (2): LeakyReLU(negative_slope=0.01)  ))), ('fc_z2_mu', Linear(in_features=2048, out_features=20, bias=True)), ('fc_z2_var', Linear(in_features=2048, out_features=20, bias=True)), ('embed_z2_code', Linear(in_features=20, out_features=4096, bias=True)), ('embed_data', Conv2d(3, 3, kernel_size=(1, 1), stride=(1, 1))), ('encoder_z1_layers', Sequential(  (0): Sequential(    (0): Conv2d(4, 32, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1))    (1): BatchNorm2d(32, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)    (2): LeakyReLU(negative_slope=0.01)  )  (1): Sequential(    (0): Conv2d(32, 64, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1))    (1): BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)    (2): LeakyReLU(negative_slope=0.01)  )  (2): Sequential(    (0): Conv2d(64, 128, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1))    (1): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)    (2): LeakyReLU(negative_slope=0.01)  )  (3): Sequential(    (0): Conv2d(128, 256, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1))    (1): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)    (2): LeakyReLU(negative_slope=0.01)  )  (4): Sequential(    (0): Conv2d(256, 512, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1))    (1): BatchNorm2d(512, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)    (2): LeakyReLU(negative_slope=0.01)  ))), ('fc_z1_mu', Linear(in_features=2048, out_features=10, bias=True)), ('fc_z1_var', Linear(in_features=2048, out_features=10, bias=True)), ('recons_z1_mu', Linear(in_features=20, out_features=10, bias=True)), ('recons_z1_log_var', Linear(in_features=20, out_features=10, bias=True)), ('debed_z1_code', Linear(in_features=10, out_features=1024, bias=True)), ('debed_z2_code', Linear(in_features=20, out_features=1024, bias=True)), ('decoder', Sequential(  (0): Sequential(    (0): ConvTranspose2d(512, 256, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), output_padding=(1, 1))    (1): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)    (2): LeakyReLU(negative_slope=0.01)  )  (1): Sequential(    (0): ConvTranspose2d(256, 128, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), output_padding=(1, 1))    (1): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)    (2): LeakyReLU(negative_slope=0.01)  )  (2): Sequential(    (0): ConvTranspose2d(128, 64, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), output_padding=(1, 1))    (1): BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)    (2): LeakyReLU(negative_slope=0.01)  )  (3): Sequential(    (0): ConvTranspose2d(64, 32, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), output_padding=(1, 1))    (1): BatchNorm2d(32, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)    (2): LeakyReLU(negative_slope=0.01)  ))), ('final_layer', Sequential(  (0): ConvTranspose2d(32, 32, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), output_padding=(1, 1))  (1): BatchNorm2d(32, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)  (2): LeakyReLU(negative_slope=0.01)  (3): Conv2d(32, 3, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))  (4): Tanh()))]), self._non_persistent_buffers_set=set(), self._parameters=OrderedDict(), self._state_dict_hooks=OrderedDict(), self._state_dict_pre_hooks=OrderedDict(), self.img_size=64, self.latent1_dim=10, self.latent2_dim=20, self.training=True)

Input: tensor([[[[-1.8936,  0.4196,  1.2842,  ...,  1.2066,  0.7782,  1.3469],          [-0.8224,  0.4527, -0.0577,  ...,  1.4756,  1.1761, -0.7108],          [-1.6315,  0.8043,  2.6413,  ..., -1.3240,  0.9065, -0.8693],          ...,          [ 0.0383,  1.3328, -0.1353,  ..., -1.1770, -0.1116, -0.3206],          [-1.0151,  0.2528, -0.3343,  ..., -0.0416, -0.9868,  1.1128],          [-1.0028, -1.1892,  0.7485,  ...,  0.7481,  0.0498, -0.0744]],         [[-0.2884, -0.2759,  1.1363,  ...,  1.1605,  0.0775, -1.4702],          [-1.6069, -0.0638, -0.8533,  ...,  0.2473,  1.4863,  0.0158],          [ 2.5342,  0.6854,  1.1528,  ...,  0.6568, -0.5946,  0.1834],          ...,          [ 0.3353,  0.0865, -0.9538,  ..., -1.2018, -1.4665, -0.3575],          [-0.3430, -1.4583, -0.7826,  ...,  2.1256, -0.3949,  0.1570],          [ 0.9678, -1.7589,  0.9122,  ...,  0.4558,  1.4173,  1.6013]],         [[-0.7772,  0.4630,  0.6564,  ..., -1.8964, -2.1647, -0.5534],          [ 0.4105,  0.5011,  1.2573,  ...,  0.3236,  0.9842,  1.0977],          [-0.7429,  1.0571,  0.6543,  ...,  0.3400, -0.2293, -0.5091],          ...,          [ 0.1505, -0.3082,  0.3324,  ...,  0.6619, -0.0814,  0.6934],          [-1.7772, -1.9982,  0.5367,  ...,  0.1102, -0.7138,  0.8455],          [ 0.0332, -0.3734, -1.5362,  ..., -1.2318, -0.4791, -1.6185]]],        [[[ 0.0160,  0.7455,  0.3158,  ..., -0.0860,  0.2626,  1.1479],          [-0.4146,  1.8953,  0.0897,  ..., -0.3885,  1.2116, -1.0973],          [-0.6872, -1.8162,  0.1554,  ..., -1.7179,  1.0908,  0.8081],          ...,          [ 0.1696, -1.8558,  0.1469,  ...,  0.3142,  2.3475,  0.4731],          [ 0.1529, -1.0062,  0.7995,  ...,  0.2377,  0.8177,  0.9386],          [ 0.0217, -0.4921, -0.8103,  ...,  2.6341, -0.5868, -0.0105]],         [[ 1.4296,  0.8156, -0.1442,  ..., -1.5969,  0.2655,  1.3892],          [ 0.0990, -0.1513, -0.2613,  ..., -0.5251, -0.1855, -0.1718],          [ 1.4328,  0.2132, -1.6794,  ...,  0.8488,  1.4868, -1.7160],          ...,          [-0.0693,  0.1337,  1.1090,  ..., -1.3724, -2.5672,  1.0906],          [ 0.2655,  0.3716, -0.1245,  ...,  0.7961, -0.3946,  1.0061],          [-0.8810,  0.1413, -0.6222,  ..., -0.4905, -0.3606, -1.0626]],         [[-0.0948, -0.0486,  0.0157,  ...,  2.1004, -1.5879, -0.2739],          [-0.2656,  1.1246,  1.0048,  ...,  0.4671, -0.1705, -0.7745],          [-0.3759,  0.2029, -1.7732,  ..., -0.2653, -2.3626, -1.0251],          ...,          [ 1.4900, -1.3544,  1.5717,  ..., -1.9406,  0.7142, -0.6601],          [ 0.0120,  0.9058,  0.0421,  ...,  1.5632,  1.1624,  0.1822],          [-0.9256,  0.8344, -0.9597,  ..., -0.4188,  0.2051,  0.6043]]],        [[[-0.6292,  1.5933,  1.1558,  ..., -1.0939,  0.3556, -1.9305],          [ 2.2168,  0.9184, -0.6098,  ...,  0.1250,  0.2496,  0.5268],          [ 0.6035, -0.7713,  0.4179,  ...,  0.1061,  0.2763, -1.1580],          ...,          [ 0.6361, -0.9818,  0.2838,  ..., -0.1032, -0.1063,  0.2971],          [-0.9087, -0.8842,  1.3305,  ...,  0.7932,  1.0652, -0.1426],          [-2.2427, -0.6605,  0.9667,  ..., -0.4021, -1.1495, -0.0572]],         [[-0.1344,  0.6562,  0.4687,  ...,  0.1312,  0.5327,  0.3450],          [ 0.4334,  1.3153,  1.9282,  ...,  0.5667,  1.4108,  0.4699],          [ 0.5254, -0.2920,  1.7819,  ..., -0.5157, -0.3931, -0.8093],          ...,          [-0.5848,  0.6157,  1.1588,  ...,  0.5449, -1.0721,  0.5217],          [ 0.3995,  0.2235,  0.2506,  ..., -0.3272,  0.8440,  0.4930],          [-0.8263, -0.0577, -0.9538,  ..., -1.2877,  1.6349,  1.3202]],         [[ 0.6381, -1.4398, -0.7744,  ...,  1.2140,  0.9096, -0.6753],          [ 0.4048, -2.5466,  1.1450,  ...,  0.5030,  0.4698,  0.5673],          [-0.0358,  0.2170, -0.6245,  ..., -0.4325,  0.5767, -0.2755],          ...,          [ 0.3158, -1.6521,  0.9919,  ...,  2.0221, -1.2303,  0.4039],          [ 0.2354, -0.9477, -0.6534,  ..., -0.5600, -1.3333,  0.5403],          [ 1.1120, -2.0893, -1.3755,  ...,  1.9954,  0.8662, -1.6815]]],        ...,        [[[ 1.2590,  0.1363, -0.6754,  ..., -0.8791,  1.2095, -0.1012],          [ 2.3050, -0.1425, -0.9242,  ..., -0.7649, -0.7488,  0.6949],          [ 0.4214,  0.3215, -2.3866,  ..., -0.5338,  0.4479, -0.8477],          ...,          [ 0.1499, -0.5690,  0.0180,  ...,  1.6823,  0.3056, -0.6216],          [-0.3886,  0.6260, -0.6109,  ...,  0.0346,  0.2253, -0.5103],          [-0.1228,  0.1755,  0.1834,  ..., -2.4334, -0.4735,  0.3909]],         [[-0.5463,  0.1758,  0.3594,  ..., -1.5349, -0.1570,  0.0686],          [-0.1374,  1.0209, -0.5383,  ..., -0.9182, -0.2435, -0.2757],          [ 0.6611, -0.2038, -1.1446,  ..., -1.4481,  0.6467, -0.6618],          ...,          [-0.2686,  0.0405, -0.1467,  ...,  1.0902,  0.5896, -0.7653],          [-1.9040,  0.0179,  1.1207,  ..., -0.2288, -1.6366,  1.1901],          [ 0.1832,  0.3417,  0.9626,  ...,  0.3803,  0.7350, -0.3099]],         [[-0.9969, -0.5508, -0.4998,  ...,  0.6936,  1.6136,  0.3220],          [-0.0770,  1.3169,  0.1651,  ...,  1.7485,  0.7226, -0.2574],          [ 0.0803, -0.9462,  1.2021,  ..., -0.0972,  0.0682,  0.1344],          ...,          [-1.7403,  1.7113,  3.0679,  ...,  1.0908,  1.0581, -0.5222],          [ 0.4028, -1.0059, -2.1630,  ..., -0.0682,  0.5164,  1.6635],          [ 2.7208, -0.5648, -0.1862,  ..., -1.5719, -0.3802,  0.2935]]],        [[[ 0.8409, -0.7438, -1.0032,  ...,  0.1318, -0.4320,  0.4415],          [ 1.5099, -1.1524,  1.1499,  ..., -1.6440, -0.0798,  0.6606],          [ 1.0045, -0.9537,  1.1316,  ..., -1.3674, -0.9758, -0.0078],          ...,          [ 0.3468,  0.5475, -0.7472,  ...,  1.5581,  0.2254,  0.8593],          [-0.0717,  0.4480,  1.3726,  ...,  0.6523, -1.1766, -0.3996],          [-1.6755, -0.8156,  0.5543,  ..., -1.4320,  0.4414, -0.1122]],         [[ 1.3380, -1.1875,  0.5178,  ...,  0.3197, -0.7422,  0.5158],          [-1.1908,  1.4007,  0.8123,  ..., -1.4919, -1.7273, -0.0800],          [-1.3901, -0.3755,  0.0897,  ...,  1.6764, -1.3049, -0.0079],          ...,          [-0.1568, -1.4188, -0.7429,  ..., -1.6218,  0.6604,  1.6529],          [ 0.6247,  0.6867, -1.0114,  ..., -0.0381,  0.1275, -0.8645],          [-0.0610,  0.5389,  0.3990,  ..., -1.0361, -2.4215, -0.6971]],         [[ 0.7516, -1.9676,  1.4015,  ...,  0.5336,  1.0704,  1.7422],          [-1.6988, -1.2900, -0.6327,  ..., -0.9592,  1.5238,  0.2264],          [ 1.0729,  0.8629, -0.5775,  ..., -0.7702, -0.0271,  0.7063],          ...,          [ 0.4322,  1.7422,  0.5302,  ...,  1.7000,  1.1956,  0.4742],          [ 0.4945,  0.2216, -1.3425,  ..., -0.9851,  0.1730,  1.0625],          [-0.6886, -0.1384, -0.4764,  ...,  0.3615,  0.5811,  0.4600]]],        [[[-0.8843,  0.8162, -0.5182,  ...,  0.3598, -0.5506, -0.5101],          [-0.4878, -1.6419, -0.5060,  ...,  1.8825, -0.1327,  0.3133],          [ 0.4729,  0.4339,  1.0820,  ..., -1.3299, -0.7871, -0.6630],          ...,          [-1.1407,  0.0937,  1.0086,  ...,  0.2854,  0.4308,  1.1841],          [ 0.3772, -0.8250,  1.1873,  ...,  0.1146, -0.7267,  0.4953],          [-0.3229, -1.0868, -0.0125,  ..., -0.6451,  1.2862, -1.9553]],         [[-0.4689, -0.3666, -0.3470,  ..., -0.0699, -1.9161, -0.4589],          [-0.4437,  0.9324, -2.2532,  ...,  0.1354,  1.1196, -0.0070],          [ 1.1838,  0.3169,  1.2460,  ..., -0.9694,  0.3669,  0.7385],          ...,          [-1.7229,  0.6705,  0.0683,  ...,  1.0143,  0.6204, -1.1060],          [ 0.2528, -2.3181, -0.0774,  ..., -0.3610,  0.4452, -0.3837],          [-1.2532, -0.3006,  0.6067,  ..., -0.8430, -0.5149,  0.8442]],         [[-1.8861, -0.4756,  0.9849,  ...,  0.7845, -0.8080, -0.6442],          [-0.7163,  0.8101, -0.1905,  ...,  0.3361,  0.6133, -0.1919],          [-0.7476, -0.5810, -0.1615,  ..., -0.5631,  0.0637, -0.1969],          ...,          [-0.9449, -0.9001,  1.0701,  ...,  0.4150,  0.1768, -0.4086],          [ 0.5126,  1.4135,  1.6389,  ..., -0.6361, -0.3524, -0.2547],          [ 0.0541, -1.5909, -1.5796,  ..., -0.1662, -0.7188, -0.6655]]]])

Input: tensor([[[[-1.8936,  0.4196,  1.2842,  ...,  1.2066,  0.7782,  1.3469],          [-0.8224,  0.4527, -0.0577,  ...,  1.4756,  1.1761, -0.7108],          [-1.6315,  0.8043,  2.6413,  ..., -1.3240,  0.9065, -0.8693],          ...,          [ 0.0383,  1.3328, -0.1353,  ..., -1.1770, -0.1116, -0.3206],          [-1.0151,  0.2528, -0.3343,  ..., -0.0416, -0.9868,  1.1128],          [-1.0028, -1.1892,  0.7485,  ...,  0.7481,  0.0498, -0.0744]],         [[-0.2884, -0.2759,  1.1363,  ...,  1.1605,  0.0775, -1.4702],          [-1.6069, -0.0638, -0.8533,  ...,  0.2473,  1.4863,  0.0158],          [ 2.5342,  0.6854,  1.1528,  ...,  0.6568, -0.5946,  0.1834],          ...,          [ 0.3353,  0.0865, -0.9538,  ..., -1.2018, -1.4665, -0.3575],          [-0.3430, -1.4583, -0.7826,  ...,  2.1256, -0.3949,  0.1570],          [ 0.9678, -1.7589,  0.9122,  ...,  0.4558,  1.4173,  1.6013]],         [[-0.7772,  0.4630,  0.6564,  ..., -1.8964, -2.1647, -0.5534],          [ 0.4105,  0.5011,  1.2573,  ...,  0.3236,  0.9842,  1.0977],          [-0.7429,  1.0571,  0.6543,  ...,  0.3400, -0.2293, -0.5091],          ...,          [ 0.1505, -0.3082,  0.3324,  ...,  0.6619, -0.0814,  0.6934],          [-1.7772, -1.9982,  0.5367,  ...,  0.1102, -0.7138,  0.8455],          [ 0.0332, -0.3734, -1.5362,  ..., -1.2318, -0.4791, -1.6185]]],        [[[ 0.0160,  0.7455,  0.3158,  ..., -0.0860,  0.2626,  1.1479],          [-0.4146,  1.8953,  0.0897,  ..., -0.3885,  1.2116, -1.0973],          [-0.6872, -1.8162,  0.1554,  ..., -1.7179,  1.0908,  0.8081],          ...,          [ 0.1696, -1.8558,  0.1469,  ...,  0.3142,  2.3475,  0.4731],          [ 0.1529, -1.0062,  0.7995,  ...,  0.2377,  0.8177,  0.9386],          [ 0.0217, -0.4921, -0.8103,  ...,  2.6341, -0.5868, -0.0105]],         [[ 1.4296,  0.8156, -0.1442,  ..., -1.5969,  0.2655,  1.3892],          [ 0.0990, -0.1513, -0.2613,  ..., -0.5251, -0.1855, -0.1718],          [ 1.4328,  0.2132, -1.6794,  ...,  0.8488,  1.4868, -1.7160],          ...,          [-0.0693,  0.1337,  1.1090,  ..., -1.3724, -2.5672,  1.0906],          [ 0.2655,  0.3716, -0.1245,  ...,  0.7961, -0.3946,  1.0061],          [-0.8810,  0.1413, -0.6222,  ..., -0.4905, -0.3606, -1.0626]],         [[-0.0948, -0.0486,  0.0157,  ...,  2.1004, -1.5879, -0.2739],          [-0.2656,  1.1246,  1.0048,  ...,  0.4671, -0.1705, -0.7745],          [-0.3759,  0.2029, -1.7732,  ..., -0.2653, -2.3626, -1.0251],          ...,          [ 1.4900, -1.3544,  1.5717,  ..., -1.9406,  0.7142, -0.6601],          [ 0.0120,  0.9058,  0.0421,  ...,  1.5632,  1.1624,  0.1822],          [-0.9256,  0.8344, -0.9597,  ..., -0.4188,  0.2051,  0.6043]]],        [[[-0.6292,  1.5933,  1.1558,  ..., -1.0939,  0.3556, -1.9305],          [ 2.2168,  0.9184, -0.6098,  ...,  0.1250,  0.2496,  0.5268],          [ 0.6035, -0.7713,  0.4179,  ...,  0.1061,  0.2763, -1.1580],          ...,          [ 0.6361, -0.9818,  0.2838,  ..., -0.1032, -0.1063,  0.2971],          [-0.9087, -0.8842,  1.3305,  ...,  0.7932,  1.0652, -0.1426],          [-2.2427, -0.6605,  0.9667,  ..., -0.4021, -1.1495, -0.0572]],         [[-0.1344,  0.6562,  0.4687,  ...,  0.1312,  0.5327,  0.3450],          [ 0.4334,  1.3153,  1.9282,  ...,  0.5667,  1.4108,  0.4699],          [ 0.5254, -0.2920,  1.7819,  ..., -0.5157, -0.3931, -0.8093],          ...,          [-0.5848,  0.6157,  1.1588,  ...,  0.5449, -1.0721,  0.5217],          [ 0.3995,  0.2235,  0.2506,  ..., -0.3272,  0.8440,  0.4930],          [-0.8263, -0.0577, -0.9538,  ..., -1.2877,  1.6349,  1.3202]],         [[ 0.6381, -1.4398, -0.7744,  ...,  1.2140,  0.9096, -0.6753],          [ 0.4048, -2.5466,  1.1450,  ...,  0.5030,  0.4698,  0.5673],          [-0.0358,  0.2170, -0.6245,  ..., -0.4325,  0.5767, -0.2755],          ...,          [ 0.3158, -1.6521,  0.9919,  ...,  2.0221, -1.2303,  0.4039],          [ 0.2354, -0.9477, -0.6534,  ..., -0.5600, -1.3333,  0.5403],          [ 1.1120, -2.0893, -1.3755,  ...,  1.9954,  0.8662, -1.6815]]],        ...,        [[[ 1.2590,  0.1363, -0.6754,  ..., -0.8791,  1.2095, -0.1012],          [ 2.3050, -0.1425, -0.9242,  ..., -0.7649, -0.7488,  0.6949],          [ 0.4214,  0.3215, -2.3866,  ..., -0.5338,  0.4479, -0.8477],          ...,          [ 0.1499, -0.5690,  0.0180,  ...,  1.6823,  0.3056, -0.6216],          [-0.3886,  0.6260, -0.6109,  ...,  0.0346,  0.2253, -0.5103],          [-0.1228,  0.1755,  0.1834,  ..., -2.4334, -0.4735,  0.3909]],         [[-0.5463,  0.1758,  0.3594,  ..., -1.5349, -0.1570,  0.0686],          [-0.1374,  1.0209, -0.5383,  ..., -0.9182, -0.2435, -0.2757],          [ 0.6611, -0.2038, -1.1446,  ..., -1.4481,  0.6467, -0.6618],          ...,          [-0.2686,  0.0405, -0.1467,  ...,  1.0902,  0.5896, -0.7653],          [-1.9040,  0.0179,  1.1207,  ..., -0.2288, -1.6366,  1.1901],          [ 0.1832,  0.3417,  0.9626,  ...,  0.3803,  0.7350, -0.3099]],         [[-0.9969, -0.5508, -0.4998,  ...,  0.6936,  1.6136,  0.3220],          [-0.0770,  1.3169,  0.1651,  ...,  1.7485,  0.7226, -0.2574],          [ 0.0803, -0.9462,  1.2021,  ..., -0.0972,  0.0682,  0.1344],          ...,          [-1.7403,  1.7113,  3.0679,  ...,  1.0908,  1.0581, -0.5222],          [ 0.4028, -1.0059, -2.1630,  ..., -0.0682,  0.5164,  1.6635],          [ 2.7208, -0.5648, -0.1862,  ..., -1.5719, -0.3802,  0.2935]]],        [[[ 0.8409, -0.7438, -1.0032,  ...,  0.1318, -0.4320,  0.4415],          [ 1.5099, -1.1524,  1.1499,  ..., -1.6440, -0.0798,  0.6606],          [ 1.0045, -0.9537,  1.1316,  ..., -1.3674, -0.9758, -0.0078],          ...,          [ 0.3468,  0.5475, -0.7472,  ...,  1.5581,  0.2254,  0.8593],          [-0.0717,  0.4480,  1.3726,  ...,  0.6523, -1.1766, -0.3996],          [-1.6755, -0.8156,  0.5543,  ..., -1.4320,  0.4414, -0.1122]],         [[ 1.3380, -1.1875,  0.5178,  ...,  0.3197, -0.7422,  0.5158],          [-1.1908,  1.4007,  0.8123,  ..., -1.4919, -1.7273, -0.0800],          [-1.3901, -0.3755,  0.0897,  ...,  1.6764, -1.3049, -0.0079],          ...,          [-0.1568, -1.4188, -0.7429,  ..., -1.6218,  0.6604,  1.6529],          [ 0.6247,  0.6867, -1.0114,  ..., -0.0381,  0.1275, -0.8645],          [-0.0610,  0.5389,  0.3990,  ..., -1.0361, -2.4215, -0.6971]],         [[ 0.7516, -1.9676,  1.4015,  ...,  0.5336,  1.0704,  1.7422],          [-1.6988, -1.2900, -0.6327,  ..., -0.9592,  1.5238,  0.2264],          [ 1.0729,  0.8629, -0.5775,  ..., -0.7702, -0.0271,  0.7063],          ...,          [ 0.4322,  1.7422,  0.5302,  ...,  1.7000,  1.1956,  0.4742],          [ 0.4945,  0.2216, -1.3425,  ..., -0.9851,  0.1730,  1.0625],          [-0.6886, -0.1384, -0.4764,  ...,  0.3615,  0.5811,  0.4600]]],        [[[-0.8843,  0.8162, -0.5182,  ...,  0.3598, -0.5506, -0.5101],          [-0.4878, -1.6419, -0.5060,  ...,  1.8825, -0.1327,  0.3133],          [ 0.4729,  0.4339,  1.0820,  ..., -1.3299, -0.7871, -0.6630],          ...,          [-1.1407,  0.0937,  1.0086,  ...,  0.2854,  0.4308,  1.1841],          [ 0.3772, -0.8250,  1.1873,  ...,  0.1146, -0.7267,  0.4953],          [-0.3229, -1.0868, -0.0125,  ..., -0.6451,  1.2862, -1.9553]],         [[-0.4689, -0.3666, -0.3470,  ..., -0.0699, -1.9161, -0.4589],          [-0.4437,  0.9324, -2.2532,  ...,  0.1354,  1.1196, -0.0070],          [ 1.1838,  0.3169,  1.2460,  ..., -0.9694,  0.3669,  0.7385],          ...,          [-1.7229,  0.6705,  0.0683,  ...,  1.0143,  0.6204, -1.1060],          [ 0.2528, -2.3181, -0.0774,  ..., -0.3610,  0.4452, -0.3837],          [-1.2532, -0.3006,  0.6067,  ..., -0.8430, -0.5149,  0.8442]],         [[-1.8861, -0.4756,  0.9849,  ...,  0.7845, -0.8080, -0.6442],          [-0.7163,  0.8101, -0.1905,  ...,  0.3361,  0.6133, -0.1919],          [-0.7476, -0.5810, -0.1615,  ..., -0.5631,  0.0637, -0.1969],          ...,          [-0.9449, -0.9001,  1.0701,  ...,  0.4150,  0.1768, -0.4086],          [ 0.5126,  1.4135,  1.6389,  ..., -0.6361, -0.3524, -0.2547],          [ 0.0541, -1.5909, -1.5796,  ..., -0.1662, -0.7188, -0.6655]]]])


def from_json(cls, command_tree_file, translations_file):
        with open(command_tree_file, 'r') as fin:
            tree_dict = json.load(fin)
        with open(translations_file, 'r') as fin:
            command_translations = json.load(fin)
        return TokenTree(tree_dict, command_translations)

from_json(cls=<class 'bted.token_tree.TokenTree'>, command_tree_file='/local/rcs/XXX/code/pytrace-collector/logs/pypibugs/tried/XXXbihl+bted/XXXbihl+bted/bted/config/command_token_tree.json', translations_file='/local/rcs/XXX/code/pytrace-collector/logs/pypibugs/tried/XXXbihl+bted/XXXbihl+bted/bted/config/command_perl_translations.json')

{'root': {'append': {'reusable_components': ['text-with-text', 'lines-relation-text-with-text']}, 'clear': {'reusable_components': ['line-types']}, 'delete': {'$USER_TEXT_INPUT': {}, 'reusable_components': ['line-types']}, 'insert': {'reusable_components': ['text-with-text', 'lines-relation-text-with-text']}, 'prepend': {'reusable_components': ['text-with-text', 'lines-relation-text-with-text']}, 'replace': {'reusable_components': ['text-with-text', 'lines-relation-text-with-text']}, 'wrap': {'reusable_components': ['text-with-text', 'lines-relation-text-with-text']}, 'select': {'reusable_components': ['line-types']}}, 'reusable_components': {'text-with-text': {'$USER_TEXT_INPUT': {'with': {'$USER_TEXT_INPUT': {}}}}, 'line-types': {'lines': {'starting': {'with': {'$USER_TEXT_INPUT': {}}}, 'ending': {'with': {'$USER_TEXT_INPUT': {}}}, 'containing': {'$USER_TEXT_INPUT': {}}}}, 'lines-relation-text-with-text': {'lines': {'starting': {'with': {'reusable_components': ['text-with-text']}}, 'ending': {'with': {'reusable_components': ['text-with-text']}}, 'containing': {'reusable_components': ['text-with-text']}}}}}

{'delete $USER_TEXT_INPUT': "perl -wnl -e 's/{1}//g; print;' {0}", 'replace $USER_TEXT_INPUT with $USER_TEXT_INPUT': "perl -wnl -e 's/{1}/{2}/g; print;' {0}", 'append $USER_TEXT_INPUT with $USER_TEXT_INPUT': "perl -wnl -e 's/{1}/{1}{2}/g; print;' {0}", 'prepend $USER_TEXT_INPUT with $USER_TEXT_INPUT': "perl -wnl -e 's/{1}/{2}{1}/g; print;' {0}", 'wrap $USER_TEXT_INPUT with $USER_TEXT_INPUT': "perl -wnl -e 's/{1}/{2}{1}{2}/g; print;' {0}", 'delete lines containing $USER_TEXT_INPUT': "perl -ne '/{1}/ or print' {0}", 'delete lines starting with $USER_TEXT_INPUT': "perl -ne '/^{1}/ or print' {0}", 'delete lines ending with $USER_TEXT_INPUT': "perl -ne '/{1}$/ or print' {0}", 'clear lines containing $USER_TEXT_INPUT': "perl -wnl -e 's/.*{1}.*//g; print;' {0}", 'clear lines starting with $USER_TEXT_INPUT': "perl -wnl -e 's/^{1}.*//g; print;' {0}", 'clear lines ending with $USER_TEXT_INPUT': "perl -wnl -e 's/.*{1}$//g; print;' {0}", 'replace lines containing $USER_TEXT_INPUT with $USER_TEXT_INPUT': "perl -wnl -e 's/.*{1}.*/{2}/g; print;' {0}", 'replace lines starting with $USER_TEXT_INPUT with $USER_TEXT_INPUT': "perl -wnl -e 's/^{1}.*/{2}/g; print;' {0}", 'replace lines ending with $USER_TEXT_INPUT with $USER_TEXT_INPUT': "perl -wnl -e 's/.*{1}$/{2}/g; print;' {0}", 'append lines containing $USER_TEXT_INPUT with $USER_TEXT_INPUT': "perl -pe 's/$/{2}/ if /{1}/' {0}", 'append lines starting with $USER_TEXT_INPUT with $USER_TEXT_INPUT': "perl -pe 's/$/{2}/ if /^{1}/' {0}", 'append lines ending with $USER_TEXT_INPUT with $USER_TEXT_INPUT': "perl -pe 's/$/{2}/ if /{1}$/' {0}", 'prepend lines containing $USER_TEXT_INPUT with $USER_TEXT_INPUT': "perl -pe 's/.*{1}.*/{2}$&/' {0}", 'prepend lines starting with $USER_TEXT_INPUT with $USER_TEXT_INPUT': "perl -pe 's/^{1}.*/{2}$&/' {0}", 'prepend lines ending with $USER_TEXT_INPUT with $USER_TEXT_INPUT': "perl -pe 's/.*{1}$/{2}$&/' {0}", 'wrap lines containing $USER_TEXT_INPUT with $USER_TEXT_INPUT': "perl -pe 's/.*{1}.*/{2}$&{2}/' {0}", 'wrap lines starting with $USER_TEXT_INPUT with $USER_TEXT_INPUT': "perl -pe 's/^{1}.*/{2}$&{2}/' {0}", 'wrap lines ending with $USER_TEXT_INPUT with $USER_TEXT_INPUT': "perl -pe 's/.*{1}$/{2}$&{2}/' {0}", 'select lines containing $USER_TEXT_INPUT': "perl -wln -e '/{1}/ and print;' {0}", 'select lines starting with $USER_TEXT_INPUT': "perl -wln -e '/^{1}/ and print;' {0}", 'select lines ending with $USER_TEXT_INPUT': "perl -wln -e '/{1}$/ and print;' {0}"}

{'root': {'append': {'$USER_TEXT_INPUT': {'with': {'$USER_TEXT_INPUT': {}}}, 'lines': {'starting': {'with': {'$USER_TEXT_INPUT': {'with': {'$USER_TEXT_INPUT': {}}}}}, 'ending': {'with': {'$USER_TEXT_INPUT': {'with': {'$USER_TEXT_INPUT': {}}}}}, 'containing': {'$USER_TEXT_INPUT': {'with': {'$USER_TEXT_INPUT': {}}}}}}, 'clear': {'lines': {'starting': {'with': {'$USER_TEXT_INPUT': {}}}, 'ending': {'with': {'$USER_TEXT_INPUT': {}}}, 'containing': {'$USER_TEXT_INPUT': {}}}}, 'delete': {'$USER_TEXT_INPUT': {}, 'lines': {'starting': {'with': {'$USER_TEXT_INPUT': {}}}, 'ending': {'with': {'$USER_TEXT_INPUT': {}}}, 'containing': {'$USER_TEXT_INPUT': {}}}}, 'insert': {'$USER_TEXT_INPUT': {'with': {'$USER_TEXT_INPUT': {}}}, 'lines': {'starting': {'with': {'$USER_TEXT_INPUT': {'with': {'$USER_TEXT_INPUT': {}}}}}, 'ending': {'with': {'$USER_TEXT_INPUT': {'with': {'$USER_TEXT_INPUT': {}}}}}, 'containing': {'$USER_TEXT_INPUT': {'with': {'$USER_TEXT_INPUT': {}}}}}}, 'prepend': {'$USER_TEXT_INPUT': {'with': {'$USER_TEXT_INPUT': {}}}, 'lines': {'starting': {'with': {'$USER_TEXT_INPUT': {'with': {'$USER_TEXT_INPUT': {}}}}}, 'ending': {'with': {'$USER_TEXT_INPUT': {'with': {'$USER_TEXT_INPUT': {}}}}}, 'containing': {'$USER_TEXT_INPUT': {'with': {'$USER_TEXT_INPUT': {}}}}}}, 'replace': {'$USER_TEXT_INPUT': {'with': {'$USER_TEXT_INPUT': {}}}, 'lines': {'starting': {'with': {'$USER_TEXT_INPUT': {'with': {'$USER_TEXT_INPUT': {}}}}}, 'ending': {'with': {'$USER_TEXT_INPUT': {'with': {'$USER_TEXT_INPUT': {}}}}}, 'containing': {'$USER_TEXT_INPUT': {'with': {'$USER_TEXT_INPUT': {}}}}}}, 'wrap': {'$USER_TEXT_INPUT': {'with': {'$USER_TEXT_INPUT': {}}}, 'lines': {'starting': {'with': {'$USER_TEXT_INPUT': {'with': {'$USER_TEXT_INPUT': {}}}}}, 'ending': {'with': {'$USER_TEXT_INPUT': {'with': {'$USER_TEXT_INPUT': {}}}}}, 'containing': {'$USER_TEXT_INPUT': {'with': {'$USER_TEXT_INPUT': {}}}}}}, 'select': {'lines': {'starting': {'with': {'$USER_TEXT_INPUT': {}}}, 'ending': {'with': {'$USER_TEXT_INPUT': {}}}, 'containing': {'$USER_TEXT_INPUT': {}}}}}, 'reusable_components': {'text-with-text': {'$USER_TEXT_INPUT': {'with': {'$USER_TEXT_INPUT': {}}}}, 'line-types': {'lines': {'starting': {'with': {'$USER_TEXT_INPUT': {}}}, 'ending': {'with': {'$USER_TEXT_INPUT': {}}}, 'containing': {'$USER_TEXT_INPUT': {}}}}, 'lines-relation-text-with-text': {'lines': {'starting': {'with': {'$USER_TEXT_INPUT': {'with': {'$USER_TEXT_INPUT': {}}}}}, 'ending': {'with': {'$USER_TEXT_INPUT': {'with': {'$USER_TEXT_INPUT': {}}}}}, 'containing': {'$USER_TEXT_INPUT': {'with': {'$USER_TEXT_INPUT': {}}}}}}}}


def glob_absolute_paths(file: Union[str, Path]) -> List[Path]:
            path = Path(file)
            if not path.is_absolute():
                path = base / path
            return sorted(path.parent.glob(path.name), key=lambda p: p.stem)

glob_absolute_paths(file='aggrid.js', base=PosixPath('/local/rcs/XXX/code/pytrace-collector/logs/self_collected/tried/zauberzeug+nicegui/zauberzeug+nicegui/nicegui/elements'))


def _read2DArray(fp, data_type: str = "i", storage_type: str = None, file_dims: tuple = None):
        if storage_type == 'SPSE':
            raise TypeError('Sparse storage not allowed for 2D data form.')

        if data_type in ["i", "I"]:
            data_type = np.int32
            data_type_str = "i"
        elif data_type in ["f", "F"]:
            data_type = np.float32
            data_type_str = "f"
        else:
            raise ValueError(
                "Provided argument 'data_type' must be 'i' (integer) or 'f' (float). '%s' was provided." % data_type)

        # Note that 'order' refers to Fortran vs C (i.e. has nothing to do with floats or ints)
        array = np.ndarray(shape=file_dims[0:2], dtype=data_type, order='F')

        arraySize = array.size
        nread = 0
        while nread != arraySize:
            nbyte = HarFileIO._getEntrySize(fp)
            dataForm = "=4siiiiiii"
            V = HarFileIO._unpack_data(fp, dataForm)

            if fb(V[0]) != '    ':
                raise RuntimeError("Encountered characters at read2D loop")
            if V[2] != array.shape[0]:
                raise ValueError("Mismatching row sizes on header")
            if V[3] != array.shape[1]:
                raise ValueError("Mismatching col sizes on header")

            xsize = V[5] - V[4] + 1
            ysize = V[7] - V[6] + 1
            ndata = xsize * ysize
            nread += ndata
            dataForm = "=" + str(ndata) + data_type_str
            dat = HarFileIO._unpack_data(fp, dataForm)
            array[V[4] - 1:V[5], V[6] - 1:V[7]] = np.array(dat).reshape(xsize, ysize, order='F')

            if nbyte != HarFileIO._getEntrySize(fp):
                raise RuntimeError('Header corrupted.')

        # array = HAR_IO._read2DObj(fp, data_type, file_dims)
        array = np.ascontiguousarray(array)
        return array

_read2DArray(fp=<_io.BufferedReader name='/local/rcs/XXX/code/pytrace-collector/logs/pypibugs/tried/GEMPACKsoftware+HARPY/GEMPACKsoftware+HARPY/test_remove_header_array.har'>, data_type='i', storage_type='FULL', file_dims=(4, 4))


def _tranmat(a, b):
    """
    Get the coefficents for the affine-linear function f(x)=Ax+s.

    Which fullfills that A is a rotation-matrix,
    f(a) = [0,0] and f(b) = [|b-a|,0].
    """
    A = np.zeros((2, 2))
    A[0, 0] = b[0] - a[0]
    A[1, 1] = b[0] - a[0]
    A[1, 0] = -(b[1] - a[1])
    A[0, 1] = +(b[1] - a[1])
    A /= _dist(a, b)
    s = -np.dot(A, a)
    return A, s

_tranmat(a=array([0., 0.]), b=array([3., 0.]))


def _ParseFn(args):
    """Parses the list of `args` into (varargs, kwargs), remaining_args."""
    kwargs, remaining_kwargs, remaining_args = _ParseKeywordArgs(
        args, all_args, fn_spec.varkw)

    # Note: _ParseArgs modifies kwargs.
    parsed_args, kwargs, remaining_args, capacity = _ParseArgs(
        fn_spec.args, fn_spec.defaults, num_required_args, kwargs,
        remaining_args, metadata)

    if fn_spec.varargs or fn_spec.varkw:
      # If we're allowed *varargs or **kwargs, there's always capacity.
      capacity = True

    extra_kw = set(kwargs) - set(fn_spec.kwonlyargs)
    if fn_spec.varkw is None and extra_kw:
      raise FireError('Unexpected kwargs present:', extra_kw)

    missing_kwonly = set(required_kwonly) - set(kwargs)
    if missing_kwonly:
      raise FireError('Missing required flags:', missing_kwonly)

    # If we accept *varargs, then use all remaining arguments for *varargs.
    if fn_spec.varargs is not None:
      varargs, remaining_args = remaining_args, []
    else:
      varargs = []

    for index, value in enumerate(varargs):
      varargs[index] = _ParseValue(value, None, None, metadata)

    varargs = parsed_args + varargs
    remaining_args += remaining_kwargs

    consumed_args = args[:len(args) - len(remaining_args)]
    return (varargs, kwargs), consumed_args, remaining_args, capacity

_ParseFn(args=['x'], all_args=[], fn_spec={args=[], varargs=None, varkw='cli_args', defaults=(), kwonlyargs=[], kwonlydefaults={}, annotations={}}, metadata={'ACCEPTS_POSITIONAL_ARGS': False}, num_required_args=0, required_kwonly=set())


def splitdrive(path):
    """
    Split the path into a pair (drive, tail) where drive is either a
    mount point or the empty string. On systems which do not use drive
    specifications, drive will always be the empty string.

    In all cases, drive + tail will be the same as path.

    Equivalent to "os.path.splitdrive".

    Args:
        path (path-like object): Path or URL.

    Returns:
        tuple of str: drive, tail.
    """
    relative = get_instance(path).relpath(path)
    drive = path.rsplit(relative, 1)[0]
    if drive and not drive[-2:] == '//':
        # Keep "/" tail side
        relative = '/' + relative
        drive = drive.rstrip('/')
    return drive, relative

splitdrive(path='dummy://dir1/dir2/dir3')