def encode(self, input: Tensor) -> List[Tensor]:
        """
        Encodes the input by passing through the encoder network
        and returns the latent codes.
        :param input: (Tensor) Input tensor to encoder [N x C x H x W]
        :return: (Tensor) List of latent codes
        """
        result = self.encoder(input)

        result = torch.flatten(result, start_dim=1)
        result = self.fc(result)
        # Split the result into mu and var components
        # of the latent Gaussian distribution
        mu = self.fc_mu(result)
        log_var = self.fc_var(result)

        return [mu, log_var]

encode(self=BetaTCVAE(  (encoder): Sequential(    (0): Sequential(      (0): Conv2d(3, 32, kernel_size=(4, 4), stride=(2, 2), padding=(1, 1))      (1): LeakyReLU(negative_slope=0.01)    )    (1): Sequential(      (0): Conv2d(32, 32, kernel_size=(4, 4), stride=(2, 2), padding=(1, 1))      (1): LeakyReLU(negative_slope=0.01)    )    (2): Sequential(      (0): Conv2d(32, 32, kernel_size=(4, 4), stride=(2, 2), padding=(1, 1))      (1): LeakyReLU(negative_slope=0.01)    )    (3): Sequential(      (0): Conv2d(32, 32, kernel_size=(4, 4), stride=(2, 2), padding=(1, 1))      (1): LeakyReLU(negative_slope=0.01)    )  )  (fc): Linear(in_features=512, out_features=256, bias=True)  (fc_mu): Linear(in_features=256, out_features=64, bias=True)  (fc_var): Linear(in_features=256, out_features=64, bias=True)  (decoder_input): Linear(in_features=64, out_features=512, bias=True)  (decoder): Sequential(    (0): Sequential(      (0): ConvTranspose2d(32, 32, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), output_padding=(1, 1))      (1): LeakyReLU(negative_slope=0.01)    )    (1): Sequential(      (0): ConvTranspose2d(32, 32, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), output_padding=(1, 1))      (1): LeakyReLU(negative_slope=0.01)    )    (2): Sequential(      (0): ConvTranspose2d(32, 32, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), output_padding=(1, 1))      (1): 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): LeakyReLU(negative_slope=0.01)    (2): Conv2d(32, 3, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))    (3): Tanh()  )), input=tensor([[[[ 5.3185e-01, -3.9774e-01,  3.6972e-01,  ...,  1.1367e+00,            1.1521e+00, -1.6743e+00],          [ 2.0578e+00,  1.9519e+00, -2.8100e+00,  ..., -5.8015e-01,           -1.3863e+00,  2.3038e-01],          [ 7.4288e-01,  6.0677e-01, -3.6157e-01,  ...,  2.7795e-01,           -1.0206e+00,  8.1242e-02],          ...,          [-7.0247e-01,  1.4037e+00, -1.1149e+00,  ..., -1.4894e+00,           -2.4559e-01, -1.8430e+00],          [-9.3718e-01, -1.2054e+00,  1.2919e+00,  ..., -5.7453e-01,            3.6835e-01, -7.4638e-01],          [-2.2104e-01, -5.9905e-01,  8.6197e-01,  ..., -3.7539e-01,           -1.2531e+00,  1.1781e-01]],         [[-2.0944e+00, -7.4385e-01, -9.7033e-01,  ..., -7.8675e-02,           -7.4620e-02, -1.6986e+00],          [ 4.0385e-01, -1.2824e+00,  6.0149e-02,  ..., -3.6837e-01,           -1.0242e-01, -8.2039e-02],          [-9.8629e-01, -7.1538e-01,  1.9335e+00,  ...,  9.1957e-01,            5.5281e-01,  1.2864e+00],          ...,          [ 7.5726e-02,  2.4742e-01, -2.4193e-01,  ...,  8.5353e-01,           -2.7577e-01, -2.6538e+00],          [-9.8466e-03, -9.5950e-01,  7.3757e-02,  ...,  8.5767e-02,            1.4790e+00,  5.5942e-01],          [ 1.2253e+00, -7.8919e-01, -2.9739e-01,  ..., -3.1689e-01,           -5.6716e-01,  7.9165e-01]],         [[-4.0525e-01, -8.3349e-01,  5.2918e-01,  ...,  7.9677e-01,           -1.0793e+00, -3.8235e-01],          [ 1.7477e+00,  2.9892e-01, -1.1484e+00,  ...,  9.3641e-01,            9.4447e-01, -1.2406e+00],          [ 1.4655e-01, -2.0048e+00, -1.4054e+00,  ..., -5.4709e-01,            2.0894e-01,  1.0476e-01],          ...,          [ 1.0665e-01,  1.9868e-01,  2.2229e-01,  ..., -2.8227e-01,            1.0278e+00,  1.2411e-01],          [-9.5577e-01,  1.8679e-01,  1.3016e+00,  ..., -9.7086e-01,           -1.0557e+00,  6.7745e-02],          [ 1.4790e+00, -2.0436e+00, -1.1996e+00,  ..., -6.4002e-01,            2.2152e+00, -9.9841e-01]]],        [[[ 1.5455e-01,  2.8293e+00,  1.5297e+00,  ..., -8.6605e-01,            1.0608e+00,  1.1515e-01],          [ 1.4160e+00, -1.0184e+00,  9.7726e-01,  ...,  1.1619e+00,            6.8690e-01,  1.3305e+00],          [ 1.0506e+00, -7.1100e-01,  1.3180e-01,  ..., -4.9396e-02,            5.1341e-02,  8.4380e-01],          ...,          [ 2.1367e-02,  8.5591e-01,  7.2118e-03,  ...,  9.6486e-01,            3.9966e-01,  2.8569e-01],          [ 1.5647e+00, -1.1883e-01, -6.4004e-02,  ..., -1.3983e+00,           -4.6075e-01,  8.1895e-02],          [ 1.7330e+00,  4.0375e-01, -1.6357e-01,  ...,  3.0821e-03,            5.5183e-01,  8.5084e-01]],         [[-1.5776e+00,  5.9163e-01,  1.3641e+00,  ...,  5.6345e-01,            8.4972e-01, -6.4639e-01],          [ 1.3402e+00, -1.6378e-01, -1.1405e+00,  ...,  1.0874e-01,           -1.8486e+00, -5.0235e-01],          [ 5.7208e-01,  1.6543e+00,  1.3152e-01,  ...,  1.2373e+00,            8.2186e-01,  4.3303e-01],          ...,          [-1.1077e+00,  1.7493e-01,  6.4322e-01,  ..., -7.8351e-01,           -5.3578e-01,  1.4140e+00],          [-9.0306e-01,  1.8420e+00, -1.0662e+00,  ..., -5.9949e-02,            1.3193e+00,  3.2077e-02],          [ 5.4261e-01, -4.4406e-02,  4.6330e-02,  ..., -9.6119e-01,            6.7180e-01, -4.8122e-02]],         [[ 8.6250e-01, -6.7066e-02, -3.5274e-01,  ...,  1.9979e-01,           -1.6411e+00, -5.3606e-01],          [ 1.1685e+00, -2.0047e-01,  3.0468e-01,  ..., -1.0746e+00,           -9.1865e-01, -1.1219e+00],          [ 7.6191e-01, -3.8277e-01,  6.3079e-01,  ..., -2.4246e+00,           -2.6817e-01,  7.6165e-01],          ...,          [-7.7297e-01, -4.5526e-01, -6.6731e-03,  ..., -1.3138e+00,           -7.1513e-01, -4.9017e-01],          [ 1.0308e+00,  1.2848e+00,  5.1048e-01,  ..., -1.6668e+00,           -2.1581e-01,  1.3934e+00],          [-1.3691e+00,  9.5055e-01,  9.4900e-01,  ..., -2.6176e-02,            5.8659e-01, -2.2248e+00]]],        [[[ 6.9125e-01, -1.0737e+00, -6.2224e-01,  ..., -6.9978e-01,           -1.5117e-01,  1.2280e+00],          [ 8.1159e-01, -4.8034e-01,  4.1112e-01,  ...,  6.2597e-01,            9.8856e-01,  3.8114e-01],          [ ...7472e+00],          [-5.3230e-01, -1.8319e+00, -1.4415e+00,  ...,  1.5285e+00,            5.9762e-01,  6.3045e-01],          [-8.2676e-01,  1.1276e-01,  6.3077e-01,  ...,  8.4853e-01,           -6.3750e-01,  4.9089e-01]]],        [[[ 4.3172e-01, -1.0873e+00, -9.0388e-01,  ..., -3.2324e-01,           -4.4410e-01, -7.3016e-01],          [ 1.3609e+00, -2.0047e-01, -1.1894e+00,  ...,  3.1399e-01,            1.9187e-01, -1.2643e-01],          [-8.1190e-01,  3.9284e-01, -1.2749e+00,  ..., -7.3253e-01,           -2.4893e+00,  2.9426e-01],          ...,          [-3.4773e-01,  7.2801e-01,  4.3619e-01,  ..., -6.3637e-01,            1.1142e+00, -4.1677e-01],          [ 2.0785e+00, -2.3168e+00,  7.7228e-02,  ...,  2.9332e-01,            2.2538e+00,  1.2741e+00],          [ 2.5713e-01,  2.7087e-01, -8.5220e-01,  ..., -8.5929e-01,            2.1949e-01,  1.3974e-01]],         [[ 1.3550e+00, -1.0758e+00,  1.1293e+00,  ..., -1.0205e+00,           -1.4944e-01, -1.2729e-01],          [-1.4885e+00, -3.5000e-01, -1.6846e+00,  ..., -1.0720e+00,           -2.9126e+00, -1.1050e-01],          [-2.5364e+00,  1.5951e+00, -3.5153e-01,  ...,  1.3554e+00,            9.6909e-01, -5.9874e-01],          ...,          [ 1.6880e+00, -3.5601e-01, -1.3960e+00,  ...,  1.3715e-01,           -5.1912e-01, -5.8030e-01],          [ 4.0335e-01,  6.5779e-01, -5.9033e-01,  ...,  6.4427e-01,           -6.5489e-01,  1.4476e+00],          [-6.4476e-01, -9.0709e-01, -5.4367e-01,  ..., -2.2654e-01,            2.4975e+00,  1.5439e+00]],         [[-5.2828e-01, -1.0348e-01,  3.0785e-01,  ..., -2.1140e+00,           -1.5042e+00,  8.4573e-02],          [-1.1699e+00, -8.7621e-01,  1.2186e+00,  ...,  1.0481e+00,            6.7535e-01, -2.4795e+00],          [-2.1606e-01,  1.4074e+00,  4.5803e-01,  ..., -4.9758e-01,           -5.3421e-02, -1.6878e+00],          ...,          [-8.0470e-01, -6.5579e-02, -1.4215e+00,  ..., -9.2709e-01,           -1.3101e+00, -6.3970e-01],          [ 8.2744e-01,  6.1637e-01,  7.9837e-03,  ..., -1.1195e+00,           -1.0946e+00,  9.7312e-01],          [-1.7113e+00, -1.2098e+00,  1.0424e-01,  ..., -2.6068e-01,           -7.1830e-01,  1.0582e+00]]],        [[[ 1.2083e+00,  2.2576e-01,  2.2029e+00,  ...,  1.6064e-01,           -6.7711e-01, -8.1935e-01],          [-1.5649e+00,  1.8701e-01,  6.6335e-01,  ..., -3.2193e-01,            1.7482e+00,  1.2873e+00],          [ 2.4682e-01, -3.3585e-02, -7.3295e-01,  ..., -9.7423e-01,           -5.0875e-01,  1.5034e+00],          ...,          [-1.6163e-04, -3.4227e-02, -2.4157e-01,  ..., -1.0951e+00,            5.8072e-01,  2.5867e-01],          [ 5.9858e-01, -1.4594e+00, -4.2557e-01,  ..., -1.4083e+00,            1.0062e+00, -2.6702e+00],          [ 2.2283e-02,  1.9899e-01, -3.1685e-01,  ..., -9.9946e-01,           -3.1641e-01, -2.1764e+00]],         [[ 2.8564e-01,  4.7435e-01,  1.3970e+00,  ...,  1.4685e-01,            5.1340e-01,  4.2743e-01],          [-1.1349e+00,  1.7398e-01,  8.5008e-02,  ..., -3.1036e-01,            1.3757e+00, -1.1701e+00],          [-5.9442e-01,  3.3539e-01,  1.0349e+00,  ..., -2.2516e+00,            5.1274e-01, -2.2695e-02],          ...,          [ 2.6707e-01, -3.9661e-02,  7.8258e-01,  ...,  1.6181e-02,           -1.0170e+00, -5.4829e-01],          [-6.0622e-01,  1.5736e+00, -7.9128e-01,  ..., -1.1797e-01,           -1.4455e+00,  8.4701e-01],          [-1.5520e+00, -1.6892e+00, -7.7782e-01,  ..., -4.0195e-01,           -4.3646e-01,  2.6970e-01]],         [[ 6.9032e-01,  7.9203e-01,  4.5647e-02,  ...,  6.9158e-01,            8.2187e-01,  2.1916e+00],          [ 8.0458e-01,  1.4788e+00, -1.6513e-01,  ...,  1.0400e+00,            9.9060e-01, -3.3930e-02],          [ 1.4022e-01, -8.6108e-01, -3.1557e-01,  ...,  5.9925e-01,            1.8452e+00,  1.8993e+00],          ...,          [ 9.7114e-01,  2.4893e-01,  8.9429e-01,  ...,  1.3282e+00,           -6.3248e-02,  4.3927e-02],          [-9.2447e-01,  3.5266e-01,  5.7714e-01,  ...,  1.0636e+00,            2.2731e-01, -8.6034e-01],          [-1.1792e+00,  2.3629e-01, -1.5843e+00,  ..., -3.3812e-01,           -1.5923e+00, -5.8710e-01]]]]), 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', Sequential(  (0): Sequential(    (0): Conv2d(3, 32, kernel_size=(4, 4), stride=(2, 2), padding=(1, 1))    (1): LeakyReLU(negative_slope=0.01)  )  (1): Sequential(    (0): Conv2d(32, 32, kernel_size=(4, 4), stride=(2, 2), padding=(1, 1))    (1): LeakyReLU(negative_slope=0.01)  )  (2): Sequential(    (0): Conv2d(32, 32, kernel_size=(4, 4), stride=(2, 2), padding=(1, 1))    (1): LeakyReLU(negative_slope=0.01)  )  (3): Sequential(    (0): Conv2d(32, 32, kernel_size=(4, 4), stride=(2, 2), padding=(1, 1))    (1): LeakyReLU(negative_slope=0.01)  ))), ('fc', Linear(in_features=512, out_features=256, bias=True)), ('fc_mu', Linear(in_features=256, out_features=64, bias=True)), ('fc_var', Linear(in_features=256, out_features=64, bias=True)), ('decoder_input', Linear(in_features=64, out_features=512, bias=True)), ('decoder', Sequential(  (0): Sequential(    (0): ConvTranspose2d(32, 32, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), output_padding=(1, 1))    (1): LeakyReLU(negative_slope=0.01)  )  (1): Sequential(    (0): ConvTranspose2d(32, 32, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), output_padding=(1, 1))    (1): LeakyReLU(negative_slope=0.01)  )  (2): Sequential(    (0): ConvTranspose2d(32, 32, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), output_padding=(1, 1))    (1): 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): LeakyReLU(negative_slope=0.01)  (2): Conv2d(32, 3, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))  (3): Tanh()))]), self._non_persistent_buffers_set=set(), self._parameters=OrderedDict(), self._state_dict_hooks=OrderedDict(), self._state_dict_pre_hooks=OrderedDict(), self.alpha=1.0, self.anneal_steps=100, self.beta=6.0, self.gamma=1.0, self.latent_dim=64, self.training=True)

Input: tensor([[[[ 5.3185e-01, -3.9774e-01,  3.6972e-01,  ...,  1.1367e+00,            1.1521e+00, -1.6743e+00],          [ 2.0578e+00,  1.9519e+00, -2.8100e+00,  ..., -5.8015e-01,           -1.3863e+00,  2.3038e-01],          [ 7.4288e-01,  6.0677e-01, -3.6157e-01,  ...,  2.7795e-01,           -1.0206e+00,  8.1242e-02],          ...,          [-7.0247e-01,  1.4037e+00, -1.1149e+00,  ..., -1.4894e+00,           -2.4559e-01, -1.8430e+00],          [-9.3718e-01, -1.2054e+00,  1.2919e+00,  ..., -5.7453e-01,            3.6835e-01, -7.4638e-01],          [-2.2104e-01, -5.9905e-01,  8.6197e-01,  ..., -3.7539e-01,           -1.2531e+00,  1.1781e-01]],         [[-2.0944e+00, -7.4385e-01, -9.7033e-01,  ..., -7.8675e-02,           -7.4620e-02, -1.6986e+00],          [ 4.0385e-01, -1.2824e+00,  6.0149e-02,  ..., -3.6837e-01,           -1.0242e-01, -8.2039e-02],          [-9.8629e-01, -7.1538e-01,  1.9335e+00,  ...,  9.1957e-01,            5.5281e-01,  1.2864e+00],          ...,          [ 7.5726e-02,  2.4742e-01, -2.4193e-01,  ...,  8.5353e-01,           -2.7577e-01, -2.6538e+00],          [-9.8466e-03, -9.5950e-01,  7.3757e-02,  ...,  8.5767e-02,            1.4790e+00,  5.5942e-01],          [ 1.2253e+00, -7.8919e-01, -2.9739e-01,  ..., -3.1689e-01,           -5.6716e-01,  7.9165e-01]],         [[-4.0525e-01, -8.3349e-01,  5.2918e-01,  ...,  7.9677e-01,           -1.0793e+00, -3.8235e-01],          [ 1.7477e+00,  2.9892e-01, -1.1484e+00,  ...,  9.3641e-01,            9.4447e-01, -1.2406e+00],          [ 1.4655e-01, -2.0048e+00, -1.4054e+00,  ..., -5.4709e-01,            2.0894e-01,  1.0476e-01],          ...,          [ 1.0665e-01,  1.9868e-01,  2.2229e-01,  ..., -2.8227e-01,            1.0278e+00,  1.2411e-01],          [-9.5577e-01,  1.8679e-01,  1.3016e+00,  ..., -9.7086e-01,           -1.0557e+00,  6.7745e-02],          [ 1.4790e+00, -2.0436e+00, -1.1996e+00,  ..., -6.4002e-01,            2.2152e+00, -9.9841e-01]]],        [[[ 1.5455e-01,  2.8293e+00,  1.5297e+00,  ..., -8.6605e-01,            1.0608e+00,  1.1515e-01],          [ 1.4160e+00, -1.0184e+00,  9.7726e-01,  ...,  1.1619e+00,            6.8690e-01,  1.3305e+00],          [ 1.0506e+00, -7.1100e-01,  1.3180e-01,  ..., -4.9396e-02,            5.1341e-02,  8.4380e-01],          ...,          [ 2.1367e-02,  8.5591e-01,  7.2118e-03,  ...,  9.6486e-01,            3.9966e-01,  2.8569e-01],          [ 1.5647e+00, -1.1883e-01, -6.4004e-02,  ..., -1.3983e+00,           -4.6075e-01,  8.1895e-02],          [ 1.7330e+00,  4.0375e-01, -1.6357e-01,  ...,  3.0821e-03,            5.5183e-01,  8.5084e-01]],         [[-1.5776e+00,  5.9163e-01,  1.3641e+00,  ...,  5.6345e-01,            8.4972e-01, -6.4639e-01],          [ 1.3402e+00, -1.6378e-01, -1.1405e+00,  ...,  1.0874e-01,           -1.8486e+00, -5.0235e-01],          [ 5.7208e-01,  1.6543e+00,  1.3152e-01,  ...,  1.2373e+00,            8.2186e-01,  4.3303e-01],          ...,          [-1.1077e+00,  1.7493e-01,  6.4322e-01,  ..., -7.8351e-01,           -5.3578e-01,  1.4140e+00],          [-9.0306e-01,  1.8420e+00, -1.0662e+00,  ..., -5.9949e-02,            1.3193e+00,  3.2077e-02],          [ 5.4261e-01, -4.4406e-02,  4.6330e-02,  ..., -9.6119e-01,            6.7180e-01, -4.8122e-02]],         [[ 8.6250e-01, -6.7066e-02, -3.5274e-01,  ...,  1.9979e-01,           -1.6411e+00, -5.3606e-01],          [ 1.1685e+00, -2.0047e-01,  3.0468e-01,  ..., -1.0746e+00,           -9.1865e-01, -1.1219e+00],          [ 7.6191e-01, -3.8277e-01,  6.3079e-01,  ..., -2.4246e+00,           -2.6817e-01,  7.6165e-01],          ...,          [-7.7297e-01, -4.5526e-01, -6.6731e-03,  ..., -1.3138e+00,           -7.1513e-01, -4.9017e-01],          [ 1.0308e+00,  1.2848e+00,  5.1048e-01,  ..., -1.6668e+00,           -2.1581e-01,  1.3934e+00],          [-1.3691e+00,  9.5055e-01,  9.4900e-01,  ..., -2.6176e-02,            5.8659e-01, -2.2248e+00]]],        [[[ 6.9125e-01, -1.0737e+00, -6.2224e-01,  ..., -6.9978e-01,           -1.5117e-01,  1.2280e+00],          [ 8.1159e-01, -4.8034e-01,  4.1112e-01,  ...,  6.2597e-01,            9.8856e-01,  3.8114e-01],          [ ...7472e+00],          [-5.3230e-01, -1.8319e+00, -1.4415e+00,  ...,  1.5285e+00,            5.9762e-01,  6.3045e-01],          [-8.2676e-01,  1.1276e-01,  6.3077e-01,  ...,  8.4853e-01,           -6.3750e-01,  4.9089e-01]]],        [[[ 4.3172e-01, -1.0873e+00, -9.0388e-01,  ..., -3.2324e-01,           -4.4410e-01, -7.3016e-01],          [ 1.3609e+00, -2.0047e-01, -1.1894e+00,  ...,  3.1399e-01,            1.9187e-01, -1.2643e-01],          [-8.1190e-01,  3.9284e-01, -1.2749e+00,  ..., -7.3253e-01,           -2.4893e+00,  2.9426e-01],          ...,          [-3.4773e-01,  7.2801e-01,  4.3619e-01,  ..., -6.3637e-01,            1.1142e+00, -4.1677e-01],          [ 2.0785e+00, -2.3168e+00,  7.7228e-02,  ...,  2.9332e-01,            2.2538e+00,  1.2741e+00],          [ 2.5713e-01,  2.7087e-01, -8.5220e-01,  ..., -8.5929e-01,            2.1949e-01,  1.3974e-01]],         [[ 1.3550e+00, -1.0758e+00,  1.1293e+00,  ..., -1.0205e+00,           -1.4944e-01, -1.2729e-01],          [-1.4885e+00, -3.5000e-01, -1.6846e+00,  ..., -1.0720e+00,           -2.9126e+00, -1.1050e-01],          [-2.5364e+00,  1.5951e+00, -3.5153e-01,  ...,  1.3554e+00,            9.6909e-01, -5.9874e-01],          ...,          [ 1.6880e+00, -3.5601e-01, -1.3960e+00,  ...,  1.3715e-01,           -5.1912e-01, -5.8030e-01],          [ 4.0335e-01,  6.5779e-01, -5.9033e-01,  ...,  6.4427e-01,           -6.5489e-01,  1.4476e+00],          [-6.4476e-01, -9.0709e-01, -5.4367e-01,  ..., -2.2654e-01,            2.4975e+00,  1.5439e+00]],         [[-5.2828e-01, -1.0348e-01,  3.0785e-01,  ..., -2.1140e+00,           -1.5042e+00,  8.4573e-02],          [-1.1699e+00, -8.7621e-01,  1.2186e+00,  ...,  1.0481e+00,            6.7535e-01, -2.4795e+00],          [-2.1606e-01,  1.4074e+00,  4.5803e-01,  ..., -4.9758e-01,           -5.3421e-02, -1.6878e+00],          ...,          [-8.0470e-01, -6.5579e-02, -1.4215e+00,  ..., -9.2709e-01,           -1.3101e+00, -6.3970e-01],          [ 8.2744e-01,  6.1637e-01,  7.9837e-03,  ..., -1.1195e+00,           -1.0946e+00,  9.7312e-01],          [-1.7113e+00, -1.2098e+00,  1.0424e-01,  ..., -2.6068e-01,           -7.1830e-01,  1.0582e+00]]],        [[[ 1.2083e+00,  2.2576e-01,  2.2029e+00,  ...,  1.6064e-01,           -6.7711e-01, -8.1935e-01],          [-1.5649e+00,  1.8701e-01,  6.6335e-01,  ..., -3.2193e-01,            1.7482e+00,  1.2873e+00],          [ 2.4682e-01, -3.3585e-02, -7.3295e-01,  ..., -9.7423e-01,           -5.0875e-01,  1.5034e+00],          ...,          [-1.6163e-04, -3.4227e-02, -2.4157e-01,  ..., -1.0951e+00,            5.8072e-01,  2.5867e-01],          [ 5.9858e-01, -1.4594e+00, -4.2557e-01,  ..., -1.4083e+00,            1.0062e+00, -2.6702e+00],          [ 2.2283e-02,  1.9899e-01, -3.1685e-01,  ..., -9.9946e-01,           -3.1641e-01, -2.1764e+00]],         [[ 2.8564e-01,  4.7435e-01,  1.3970e+00,  ...,  1.4685e-01,            5.1340e-01,  4.2743e-01],          [-1.1349e+00,  1.7398e-01,  8.5008e-02,  ..., -3.1036e-01,            1.3757e+00, -1.1701e+00],          [-5.9442e-01,  3.3539e-01,  1.0349e+00,  ..., -2.2516e+00,            5.1274e-01, -2.2695e-02],          ...,          [ 2.6707e-01, -3.9661e-02,  7.8258e-01,  ...,  1.6181e-02,           -1.0170e+00, -5.4829e-01],          [-6.0622e-01,  1.5736e+00, -7.9128e-01,  ..., -1.1797e-01,           -1.4455e+00,  8.4701e-01],          [-1.5520e+00, -1.6892e+00, -7.7782e-01,  ..., -4.0195e-01,           -4.3646e-01,  2.6970e-01]],         [[ 6.9032e-01,  7.9203e-01,  4.5647e-02,  ...,  6.9158e-01,            8.2187e-01,  2.1916e+00],          [ 8.0458e-01,  1.4788e+00, -1.6513e-01,  ...,  1.0400e+00,            9.9060e-01, -3.3930e-02],          [ 1.4022e-01, -8.6108e-01, -3.1557e-01,  ...,  5.9925e-01,            1.8452e+00,  1.8993e+00],          ...,          [ 9.7114e-01,  2.4893e-01,  8.9429e-01,  ...,  1.3282e+00,           -6.3248e-02,  4.3927e-02],          [-9.2447e-01,  3.5266e-01,  5.7714e-01,  ...,  1.0636e+00,            2.2731e-01, -8.6034e-01],          [-1.1792e+00,  2.3629e-01, -1.5843e+00,  ..., -3.3812e-01,           -1.5923e+00, -5.8710e-01]]]])

Input: tensor([[[[ 5.3185e-01, -3.9774e-01,  3.6972e-01,  ...,  1.1367e+00,            1.1521e+00, -1.6743e+00],          [ 2.0578e+00,  1.9519e+00, -2.8100e+00,  ..., -5.8015e-01,           -1.3863e+00,  2.3038e-01],          [ 7.4288e-01,  6.0677e-01, -3.6157e-01,  ...,  2.7795e-01,           -1.0206e+00,  8.1242e-02],          ...,          [-7.0247e-01,  1.4037e+00, -1.1149e+00,  ..., -1.4894e+00,           -2.4559e-01, -1.8430e+00],          [-9.3718e-01, -1.2054e+00,  1.2919e+00,  ..., -5.7453e-01,            3.6835e-01, -7.4638e-01],          [-2.2104e-01, -5.9905e-01,  8.6197e-01,  ..., -3.7539e-01,           -1.2531e+00,  1.1781e-01]],         [[-2.0944e+00, -7.4385e-01, -9.7033e-01,  ..., -7.8675e-02,           -7.4620e-02, -1.6986e+00],          [ 4.0385e-01, -1.2824e+00,  6.0149e-02,  ..., -3.6837e-01,           -1.0242e-01, -8.2039e-02],          [-9.8629e-01, -7.1538e-01,  1.9335e+00,  ...,  9.1957e-01,            5.5281e-01,  1.2864e+00],          ...,          [ 7.5726e-02,  2.4742e-01, -2.4193e-01,  ...,  8.5353e-01,           -2.7577e-01, -2.6538e+00],          [-9.8466e-03, -9.5950e-01,  7.3757e-02,  ...,  8.5767e-02,            1.4790e+00,  5.5942e-01],          [ 1.2253e+00, -7.8919e-01, -2.9739e-01,  ..., -3.1689e-01,           -5.6716e-01,  7.9165e-01]],         [[-4.0525e-01, -8.3349e-01,  5.2918e-01,  ...,  7.9677e-01,           -1.0793e+00, -3.8235e-01],          [ 1.7477e+00,  2.9892e-01, -1.1484e+00,  ...,  9.3641e-01,            9.4447e-01, -1.2406e+00],          [ 1.4655e-01, -2.0048e+00, -1.4054e+00,  ..., -5.4709e-01,            2.0894e-01,  1.0476e-01],          ...,          [ 1.0665e-01,  1.9868e-01,  2.2229e-01,  ..., -2.8227e-01,            1.0278e+00,  1.2411e-01],          [-9.5577e-01,  1.8679e-01,  1.3016e+00,  ..., -9.7086e-01,           -1.0557e+00,  6.7745e-02],          [ 1.4790e+00, -2.0436e+00, -1.1996e+00,  ..., -6.4002e-01,            2.2152e+00, -9.9841e-01]]],        [[[ 1.5455e-01,  2.8293e+00,  1.5297e+00,  ..., -8.6605e-01,            1.0608e+00,  1.1515e-01],          [ 1.4160e+00, -1.0184e+00,  9.7726e-01,  ...,  1.1619e+00,            6.8690e-01,  1.3305e+00],          [ 1.0506e+00, -7.1100e-01,  1.3180e-01,  ..., -4.9396e-02,            5.1341e-02,  8.4380e-01],          ...,          [ 2.1367e-02,  8.5591e-01,  7.2118e-03,  ...,  9.6486e-01,            3.9966e-01,  2.8569e-01],          [ 1.5647e+00, -1.1883e-01, -6.4004e-02,  ..., -1.3983e+00,           -4.6075e-01,  8.1895e-02],          [ 1.7330e+00,  4.0375e-01, -1.6357e-01,  ...,  3.0821e-03,            5.5183e-01,  8.5084e-01]],         [[-1.5776e+00,  5.9163e-01,  1.3641e+00,  ...,  5.6345e-01,            8.4972e-01, -6.4639e-01],          [ 1.3402e+00, -1.6378e-01, -1.1405e+00,  ...,  1.0874e-01,           -1.8486e+00, -5.0235e-01],          [ 5.7208e-01,  1.6543e+00,  1.3152e-01,  ...,  1.2373e+00,            8.2186e-01,  4.3303e-01],          ...,          [-1.1077e+00,  1.7493e-01,  6.4322e-01,  ..., -7.8351e-01,           -5.3578e-01,  1.4140e+00],          [-9.0306e-01,  1.8420e+00, -1.0662e+00,  ..., -5.9949e-02,            1.3193e+00,  3.2077e-02],          [ 5.4261e-01, -4.4406e-02,  4.6330e-02,  ..., -9.6119e-01,            6.7180e-01, -4.8122e-02]],         [[ 8.6250e-01, -6.7066e-02, -3.5274e-01,  ...,  1.9979e-01,           -1.6411e+00, -5.3606e-01],          [ 1.1685e+00, -2.0047e-01,  3.0468e-01,  ..., -1.0746e+00,           -9.1865e-01, -1.1219e+00],          [ 7.6191e-01, -3.8277e-01,  6.3079e-01,  ..., -2.4246e+00,           -2.6817e-01,  7.6165e-01],          ...,          [-7.7297e-01, -4.5526e-01, -6.6731e-03,  ..., -1.3138e+00,           -7.1513e-01, -4.9017e-01],          [ 1.0308e+00,  1.2848e+00,  5.1048e-01,  ..., -1.6668e+00,           -2.1581e-01,  1.3934e+00],          [-1.3691e+00,  9.5055e-01,  9.4900e-01,  ..., -2.6176e-02,            5.8659e-01, -2.2248e+00]]],        [[[ 6.9125e-01, -1.0737e+00, -6.2224e-01,  ..., -6.9978e-01,           -1.5117e-01,  1.2280e+00],          [ 8.1159e-01, -4.8034e-01,  4.1112e-01,  ...,  6.2597e-01,            9.8856e-01,  3.8114e-01],          [ ...7472e+00],          [-5.3230e-01, -1.8319e+00, -1.4415e+00,  ...,  1.5285e+00,            5.9762e-01,  6.3045e-01],          [-8.2676e-01,  1.1276e-01,  6.3077e-01,  ...,  8.4853e-01,           -6.3750e-01,  4.9089e-01]]],        [[[ 4.3172e-01, -1.0873e+00, -9.0388e-01,  ..., -3.2324e-01,           -4.4410e-01, -7.3016e-01],          [ 1.3609e+00, -2.0047e-01, -1.1894e+00,  ...,  3.1399e-01,            1.9187e-01, -1.2643e-01],          [-8.1190e-01,  3.9284e-01, -1.2749e+00,  ..., -7.3253e-01,           -2.4893e+00,  2.9426e-01],          ...,          [-3.4773e-01,  7.2801e-01,  4.3619e-01,  ..., -6.3637e-01,            1.1142e+00, -4.1677e-01],          [ 2.0785e+00, -2.3168e+00,  7.7228e-02,  ...,  2.9332e-01,            2.2538e+00,  1.2741e+00],          [ 2.5713e-01,  2.7087e-01, -8.5220e-01,  ..., -8.5929e-01,            2.1949e-01,  1.3974e-01]],         [[ 1.3550e+00, -1.0758e+00,  1.1293e+00,  ..., -1.0205e+00,           -1.4944e-01, -1.2729e-01],          [-1.4885e+00, -3.5000e-01, -1.6846e+00,  ..., -1.0720e+00,           -2.9126e+00, -1.1050e-01],          [-2.5364e+00,  1.5951e+00, -3.5153e-01,  ...,  1.3554e+00,            9.6909e-01, -5.9874e-01],          ...,          [ 1.6880e+00, -3.5601e-01, -1.3960e+00,  ...,  1.3715e-01,           -5.1912e-01, -5.8030e-01],          [ 4.0335e-01,  6.5779e-01, -5.9033e-01,  ...,  6.4427e-01,           -6.5489e-01,  1.4476e+00],          [-6.4476e-01, -9.0709e-01, -5.4367e-01,  ..., -2.2654e-01,            2.4975e+00,  1.5439e+00]],         [[-5.2828e-01, -1.0348e-01,  3.0785e-01,  ..., -2.1140e+00,           -1.5042e+00,  8.4573e-02],          [-1.1699e+00, -8.7621e-01,  1.2186e+00,  ...,  1.0481e+00,            6.7535e-01, -2.4795e+00],          [-2.1606e-01,  1.4074e+00,  4.5803e-01,  ..., -4.9758e-01,           -5.3421e-02, -1.6878e+00],          ...,          [-8.0470e-01, -6.5579e-02, -1.4215e+00,  ..., -9.2709e-01,           -1.3101e+00, -6.3970e-01],          [ 8.2744e-01,  6.1637e-01,  7.9837e-03,  ..., -1.1195e+00,           -1.0946e+00,  9.7312e-01],          [-1.7113e+00, -1.2098e+00,  1.0424e-01,  ..., -2.6068e-01,           -7.1830e-01,  1.0582e+00]]],        [[[ 1.2083e+00,  2.2576e-01,  2.2029e+00,  ...,  1.6064e-01,           -6.7711e-01, -8.1935e-01],          [-1.5649e+00,  1.8701e-01,  6.6335e-01,  ..., -3.2193e-01,            1.7482e+00,  1.2873e+00],          [ 2.4682e-01, -3.3585e-02, -7.3295e-01,  ..., -9.7423e-01,           -5.0875e-01,  1.5034e+00],          ...,          [-1.6163e-04, -3.4227e-02, -2.4157e-01,  ..., -1.0951e+00,            5.8072e-01,  2.5867e-01],          [ 5.9858e-01, -1.4594e+00, -4.2557e-01,  ..., -1.4083e+00,            1.0062e+00, -2.6702e+00],          [ 2.2283e-02,  1.9899e-01, -3.1685e-01,  ..., -9.9946e-01,           -3.1641e-01, -2.1764e+00]],         [[ 2.8564e-01,  4.7435e-01,  1.3970e+00,  ...,  1.4685e-01,            5.1340e-01,  4.2743e-01],          [-1.1349e+00,  1.7398e-01,  8.5008e-02,  ..., -3.1036e-01,            1.3757e+00, -1.1701e+00],          [-5.9442e-01,  3.3539e-01,  1.0349e+00,  ..., -2.2516e+00,            5.1274e-01, -2.2695e-02],          ...,          [ 2.6707e-01, -3.9661e-02,  7.8258e-01,  ...,  1.6181e-02,           -1.0170e+00, -5.4829e-01],          [-6.0622e-01,  1.5736e+00, -7.9128e-01,  ..., -1.1797e-01,           -1.4455e+00,  8.4701e-01],          [-1.5520e+00, -1.6892e+00, -7.7782e-01,  ..., -4.0195e-01,           -4.3646e-01,  2.6970e-01]],         [[ 6.9032e-01,  7.9203e-01,  4.5647e-02,  ...,  6.9158e-01,            8.2187e-01,  2.1916e+00],          [ 8.0458e-01,  1.4788e+00, -1.6513e-01,  ...,  1.0400e+00,            9.9060e-01, -3.3930e-02],          [ 1.4022e-01, -8.6108e-01, -3.1557e-01,  ...,  5.9925e-01,            1.8452e+00,  1.8993e+00],          ...,          [ 9.7114e-01,  2.4893e-01,  8.9429e-01,  ...,  1.3282e+00,           -6.3248e-02,  4.3927e-02],          [-9.2447e-01,  3.5266e-01,  5.7714e-01,  ...,  1.0636e+00,            2.2731e-01, -8.6034e-01],          [-1.1792e+00,  2.3629e-01, -1.5843e+00,  ..., -3.3812e-01,           -1.5923e+00, -5.8710e-01]]]])

Input: tensor([[[[ 5.3185e-01, -3.9774e-01,  3.6972e-01,  ...,  1.1367e+00,            1.1521e+00, -1.6743e+00],          [ 2.0578e+00,  1.9519e+00, -2.8100e+00,  ..., -5.8015e-01,           -1.3863e+00,  2.3038e-01],          [ 7.4288e-01,  6.0677e-01, -3.6157e-01,  ...,  2.7795e-01,           -1.0206e+00,  8.1242e-02],          ...,          [-7.0247e-01,  1.4037e+00, -1.1149e+00,  ..., -1.4894e+00,           -2.4559e-01, -1.8430e+00],          [-9.3718e-01, -1.2054e+00,  1.2919e+00,  ..., -5.7453e-01,            3.6835e-01, -7.4638e-01],          [-2.2104e-01, -5.9905e-01,  8.6197e-01,  ..., -3.7539e-01,           -1.2531e+00,  1.1781e-01]],         [[-2.0944e+00, -7.4385e-01, -9.7033e-01,  ..., -7.8675e-02,           -7.4620e-02, -1.6986e+00],          [ 4.0385e-01, -1.2824e+00,  6.0149e-02,  ..., -3.6837e-01,           -1.0242e-01, -8.2039e-02],          [-9.8629e-01, -7.1538e-01,  1.9335e+00,  ...,  9.1957e-01,            5.5281e-01,  1.2864e+00],          ...,          [ 7.5726e-02,  2.4742e-01, -2.4193e-01,  ...,  8.5353e-01,           -2.7577e-01, -2.6538e+00],          [-9.8466e-03, -9.5950e-01,  7.3757e-02,  ...,  8.5767e-02,            1.4790e+00,  5.5942e-01],          [ 1.2253e+00, -7.8919e-01, -2.9739e-01,  ..., -3.1689e-01,           -5.6716e-01,  7.9165e-01]],         [[-4.0525e-01, -8.3349e-01,  5.2918e-01,  ...,  7.9677e-01,           -1.0793e+00, -3.8235e-01],          [ 1.7477e+00,  2.9892e-01, -1.1484e+00,  ...,  9.3641e-01,            9.4447e-01, -1.2406e+00],          [ 1.4655e-01, -2.0048e+00, -1.4054e+00,  ..., -5.4709e-01,            2.0894e-01,  1.0476e-01],          ...,          [ 1.0665e-01,  1.9868e-01,  2.2229e-01,  ..., -2.8227e-01,            1.0278e+00,  1.2411e-01],          [-9.5577e-01,  1.8679e-01,  1.3016e+00,  ..., -9.7086e-01,           -1.0557e+00,  6.7745e-02],          [ 1.4790e+00, -2.0436e+00, -1.1996e+00,  ..., -6.4002e-01,            2.2152e+00, -9.9841e-01]]],        [[[ 1.5455e-01,  2.8293e+00,  1.5297e+00,  ..., -8.6605e-01,            1.0608e+00,  1.1515e-01],          [ 1.4160e+00, -1.0184e+00,  9.7726e-01,  ...,  1.1619e+00,            6.8690e-01,  1.3305e+00],          [ 1.0506e+00, -7.1100e-01,  1.3180e-01,  ..., -4.9396e-02,            5.1341e-02,  8.4380e-01],          ...,          [ 2.1367e-02,  8.5591e-01,  7.2118e-03,  ...,  9.6486e-01,            3.9966e-01,  2.8569e-01],          [ 1.5647e+00, -1.1883e-01, -6.4004e-02,  ..., -1.3983e+00,           -4.6075e-01,  8.1895e-02],          [ 1.7330e+00,  4.0375e-01, -1.6357e-01,  ...,  3.0821e-03,            5.5183e-01,  8.5084e-01]],         [[-1.5776e+00,  5.9163e-01,  1.3641e+00,  ...,  5.6345e-01,            8.4972e-01, -6.4639e-01],          [ 1.3402e+00, -1.6378e-01, -1.1405e+00,  ...,  1.0874e-01,           -1.8486e+00, -5.0235e-01],          [ 5.7208e-01,  1.6543e+00,  1.3152e-01,  ...,  1.2373e+00,            8.2186e-01,  4.3303e-01],          ...,          [-1.1077e+00,  1.7493e-01,  6.4322e-01,  ..., -7.8351e-01,           -5.3578e-01,  1.4140e+00],          [-9.0306e-01,  1.8420e+00, -1.0662e+00,  ..., -5.9949e-02,            1.3193e+00,  3.2077e-02],          [ 5.4261e-01, -4.4406e-02,  4.6330e-02,  ..., -9.6119e-01,            6.7180e-01, -4.8122e-02]],         [[ 8.6250e-01, -6.7066e-02, -3.5274e-01,  ...,  1.9979e-01,           -1.6411e+00, -5.3606e-01],          [ 1.1685e+00, -2.0047e-01,  3.0468e-01,  ..., -1.0746e+00,           -9.1865e-01, -1.1219e+00],          [ 7.6191e-01, -3.8277e-01,  6.3079e-01,  ..., -2.4246e+00,           -2.6817e-01,  7.6165e-01],          ...,          [-7.7297e-01, -4.5526e-01, -6.6731e-03,  ..., -1.3138e+00,           -7.1513e-01, -4.9017e-01],          [ 1.0308e+00,  1.2848e+00,  5.1048e-01,  ..., -1.6668e+00,           -2.1581e-01,  1.3934e+00],          [-1.3691e+00,  9.5055e-01,  9.4900e-01,  ..., -2.6176e-02,            5.8659e-01, -2.2248e+00]]],        [[[ 6.9125e-01, -1.0737e+00, -6.2224e-01,  ..., -6.9978e-01,           -1.5117e-01,  1.2280e+00],          [ 8.1159e-01, -4.8034e-01,  4.1112e-01,  ...,  6.2597e-01,            9.8856e-01,  3.8114e-01],          [ ...7472e+00],          [-5.3230e-01, -1.8319e+00, -1.4415e+00,  ...,  1.5285e+00,            5.9762e-01,  6.3045e-01],          [-8.2676e-01,  1.1276e-01,  6.3077e-01,  ...,  8.4853e-01,           -6.3750e-01,  4.9089e-01]]],        [[[ 4.3172e-01, -1.0873e+00, -9.0388e-01,  ..., -3.2324e-01,           -4.4410e-01, -7.3016e-01],          [ 1.3609e+00, -2.0047e-01, -1.1894e+00,  ...,  3.1399e-01,            1.9187e-01, -1.2643e-01],          [-8.1190e-01,  3.9284e-01, -1.2749e+00,  ..., -7.3253e-01,           -2.4893e+00,  2.9426e-01],          ...,          [-3.4773e-01,  7.2801e-01,  4.3619e-01,  ..., -6.3637e-01,            1.1142e+00, -4.1677e-01],          [ 2.0785e+00, -2.3168e+00,  7.7228e-02,  ...,  2.9332e-01,            2.2538e+00,  1.2741e+00],          [ 2.5713e-01,  2.7087e-01, -8.5220e-01,  ..., -8.5929e-01,            2.1949e-01,  1.3974e-01]],         [[ 1.3550e+00, -1.0758e+00,  1.1293e+00,  ..., -1.0205e+00,           -1.4944e-01, -1.2729e-01],          [-1.4885e+00, -3.5000e-01, -1.6846e+00,  ..., -1.0720e+00,           -2.9126e+00, -1.1050e-01],          [-2.5364e+00,  1.5951e+00, -3.5153e-01,  ...,  1.3554e+00,            9.6909e-01, -5.9874e-01],          ...,          [ 1.6880e+00, -3.5601e-01, -1.3960e+00,  ...,  1.3715e-01,           -5.1912e-01, -5.8030e-01],          [ 4.0335e-01,  6.5779e-01, -5.9033e-01,  ...,  6.4427e-01,           -6.5489e-01,  1.4476e+00],          [-6.4476e-01, -9.0709e-01, -5.4367e-01,  ..., -2.2654e-01,            2.4975e+00,  1.5439e+00]],         [[-5.2828e-01, -1.0348e-01,  3.0785e-01,  ..., -2.1140e+00,           -1.5042e+00,  8.4573e-02],          [-1.1699e+00, -8.7621e-01,  1.2186e+00,  ...,  1.0481e+00,            6.7535e-01, -2.4795e+00],          [-2.1606e-01,  1.4074e+00,  4.5803e-01,  ..., -4.9758e-01,           -5.3421e-02, -1.6878e+00],          ...,          [-8.0470e-01, -6.5579e-02, -1.4215e+00,  ..., -9.2709e-01,           -1.3101e+00, -6.3970e-01],          [ 8.2744e-01,  6.1637e-01,  7.9837e-03,  ..., -1.1195e+00,           -1.0946e+00,  9.7312e-01],          [-1.7113e+00, -1.2098e+00,  1.0424e-01,  ..., -2.6068e-01,           -7.1830e-01,  1.0582e+00]]],        [[[ 1.2083e+00,  2.2576e-01,  2.2029e+00,  ...,  1.6064e-01,           -6.7711e-01, -8.1935e-01],          [-1.5649e+00,  1.8701e-01,  6.6335e-01,  ..., -3.2193e-01,            1.7482e+00,  1.2873e+00],          [ 2.4682e-01, -3.3585e-02, -7.3295e-01,  ..., -9.7423e-01,           -5.0875e-01,  1.5034e+00],          ...,          [-1.6163e-04, -3.4227e-02, -2.4157e-01,  ..., -1.0951e+00,            5.8072e-01,  2.5867e-01],          [ 5.9858e-01, -1.4594e+00, -4.2557e-01,  ..., -1.4083e+00,            1.0062e+00, -2.6702e+00],          [ 2.2283e-02,  1.9899e-01, -3.1685e-01,  ..., -9.9946e-01,           -3.1641e-01, -2.1764e+00]],         [[ 2.8564e-01,  4.7435e-01,  1.3970e+00,  ...,  1.4685e-01,            5.1340e-01,  4.2743e-01],          [-1.1349e+00,  1.7398e-01,  8.5008e-02,  ..., -3.1036e-01,            1.3757e+00, -1.1701e+00],          [-5.9442e-01,  3.3539e-01,  1.0349e+00,  ..., -2.2516e+00,            5.1274e-01, -2.2695e-02],          ...,          [ 2.6707e-01, -3.9661e-02,  7.8258e-01,  ...,  1.6181e-02,           -1.0170e+00, -5.4829e-01],          [-6.0622e-01,  1.5736e+00, -7.9128e-01,  ..., -1.1797e-01,           -1.4455e+00,  8.4701e-01],          [-1.5520e+00, -1.6892e+00, -7.7782e-01,  ..., -4.0195e-01,           -4.3646e-01,  2.6970e-01]],         [[ 6.9032e-01,  7.9203e-01,  4.5647e-02,  ...,  6.9158e-01,            8.2187e-01,  2.1916e+00],          [ 8.0458e-01,  1.4788e+00, -1.6513e-01,  ...,  1.0400e+00,            9.9060e-01, -3.3930e-02],          [ 1.4022e-01, -8.6108e-01, -3.1557e-01,  ...,  5.9925e-01,            1.8452e+00,  1.8993e+00],          ...,          [ 9.7114e-01,  2.4893e-01,  8.9429e-01,  ...,  1.3282e+00,           -6.3248e-02,  4.3927e-02],          [-9.2447e-01,  3.5266e-01,  5.7714e-01,  ...,  1.0636e+00,            2.2731e-01, -8.6034e-01],          [-1.1792e+00,  2.3629e-01, -1.5843e+00,  ..., -3.3812e-01,           -1.5923e+00, -5.8710e-01]]]])


def _global_import(name):
    p = __import__(name, globals(), locals(), level=1)
    lst = p.__all__ if '__all__' in dir(p) else dir(p)
    if lst:
        globals().pop(name, None)
        for k in lst:
            if not k.startswith('__'):
                globals()[k] = p.__dict__[k]
                __all__.append(k)

_global_import(name='base')

['DataFlow', 'ProxyDataFlow', 'RNGDataFlow', 'DataFlowTerminated']


def _prep_ordered_arg(desired_length, arguments=None):
    """Ensure list of arguments passed to add_ordered_transitions has the proper length.
    Expands the given arguments and apply same condition, callback
    to all transitions if only one has been given.

    Args:
        desired_length (int): The size of the resulting list
        arguments (optional[str, reference or list]): Parameters to be expanded.
    Returns:
        list: Parameter sets with the desired length.
    """
    arguments = listify(arguments) if arguments is not None else [None]
    if len(arguments) != desired_length and len(arguments) != 1:
        raise ValueError("Argument length must be either 1 or the same length as "
                         "the number of transitions.")
    if len(arguments) == 1:
        return arguments * desired_length
    return arguments

_prep_ordered_arg(desired_length=3, arguments=None)


def _addpoint(sol, i, distances, prec):
    """
    Try to add point i to a given solution-approach.

    gives all possibilties and a status about the solution:
        state = 0: possibilities found
        state = 1: no possibilities but no contradiction
        state = 2: solution-approach has a contradiction with point i
    """
    res = []

    # if i is already part of the solution return it
    if np.ndim(sol[i]) != 0:
        return [sol], 0

    # collect the points already present in the solution
    solpnts = []
    for n, m in enumerate(sol):
        if np.ndim(m) != 0:
            solpnts.append(n)

    # number of present points
    pntscount = len(solpnts)

    # try to add the point in all possible constellations
    for n in range(pntscount - 1):
        for m in range(n + 1, pntscount):
            tmppnt, state = _pntcoord(
                sol, i, solpnts[n], solpnts[m], distances, prec
            )

            # if possiblities are found, add them (at most 2! (think about))
            if state == 0:
                for pnt in tmppnt:
                    res.append(dcopy(sol))
                    res[-1][i] = pnt

            # if one possiblity or a contradiction is found, return the result
            if state != 1:
                return res, state

    # if the state remaind 1, return empty result and no contradiction
    return res, state

_addpoint(sol=[array([0., 0.]), array([3., 0.]), 0, 0], i=2, distances=array([[ 0.,  3.,  4.,  1.],       [ 3.,  0.,  2.,  3.],       [ 4.,  2.,  0., -1.],       [ 1.,  3., -1.,  0.]]), prec=0.1)


def elapsed_text(seconds, precise, prefix=''):
    seconds = round(seconds, 1 if precise else 0)
    if seconds < 60.:
        return '{}{:{}f}s'.format(prefix, seconds, .1 if precise else .0)

    minutes, seconds = divmod(seconds, 60.)
    if minutes < 60.:
        return '{}{:.0f}:{:0{}f}'.format(prefix, minutes, seconds, 4.1 if precise else 2.0)

    hours, minutes = divmod(minutes, 60.)
    return '{}{:.0f}:{:02.0f}:{:0{}f}'.format(prefix, hours, minutes, seconds,
                                              4.1 if precise else 2.0)

elapsed_text(seconds=1.23, precise=True, prefix='')


def _sort(a, aux, lo, hi):
        if lo >= hi:
            return

        if hi - lo + 1 < MergeSort.CUTOFF:
            InsertionSort.sort(a, lo, hi)
            return

        mid = lo + (hi - lo) // 2
        MergeSort._sort(a, aux, lo, mid)
        MergeSort._sort(a, aux, mid + 1, hi)
        MergeSort._merge(a, aux, lo, mid, hi)

_sort(a=[4, 2, 1, 23, 4, 5, 6, 7, 8, 9, 20, 11, 13, 34, 66], aux=[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], lo=0, hi=7)


def all_valid_hooks(hooks: List[Hook]) -> bool:
    hook_names = [_name(hook) for hook in _normal_hooks(hooks)]
    valid_names = GUET_HOOKS == hook_names
    valid_content = all([hook.is_guet_hook() for hook in _normal_hooks(hooks)])
    if not (valid_names and valid_content):
        hook_names = [_name(hook).replace('-guet', '') for hook in _dash_guet_normal_hooks(hooks)]
        valid_names = GUET_HOOKS == hook_names
        valid_content = all([hook.is_guet_hook() for hook in _dash_guet_normal_hooks(hooks)])
        return valid_names and valid_content
    return True

all_valid_hooks(hooks=[<Mock id='140465523545424'>, <Mock id='140465523545520'>, <Mock id='140465523546288'>])


def initial_positions(walls):
    """Calculate initial positions.

    Given the list of walls, returns the free positions that are closest to the
    bottom left and top right corner. The algorithm starts searching from
    (1, height-2) and (width-2, 1) respectively and uses the Manhattan distance
    for judging what is closest. On equal distances, a smaller distance in the
    x value is preferred.
    """
    width = max(walls)[0] + 1
    height = max(walls)[1] + 1

    left_start = (1, height - 2)
    left = []
    right_start = (width - 2, 1)
    right = []

    dist = 0
    while len(left) < 2:
        # iterate through all possible x distances (inclusive)
        for x_dist in range(dist + 1):
            y_dist = dist - x_dist
            pos = (left_start[0] + x_dist, left_start[1] - y_dist)
            # if both coordinates are out of bounds, we stop
            if not (0 <= pos[0] < width) and not (0 <= pos[1] < height):
                raise ValueError("Not enough free initial positions.")
            # if one coordinate is out of bounds, we just continue
            if not (0 <= pos[0] < width) or not (0 <= pos[1] < height):
                continue
            # check if the new value is free
            if pos not in walls:
                left.append(pos)

            if len(left) == 2:
                break

        dist += 1

    dist = 0
    while len(right) < 2:
        # iterate through all possible x distances (inclusive)
        for x_dist in range(dist + 1):
            y_dist = dist - x_dist
            pos = (right_start[0] - x_dist, right_start[1] + y_dist)
            # if both coordinates are out of bounds, we stop
            if not (0 <= pos[0] < width) and not (0 <= pos[1] < height):
                raise ValueError("Not enough free initial positions.")
            # if one coordinate is out of bounds, we just continue
            if not (0 <= pos[0] < width) or not (0 <= pos[1] < height):
                continue
            # check if the new value is free
            if pos not in walls:
                right.append(pos)

            if len(right) == 2:
                break

        dist += 1

    # lower indices start further away
    left.reverse()
    right.reverse()
    return [left[0], right[0], left[1], right[1]]

initial_positions(walls=[(0, 0), (0, 1), (0, 2), (0, 3), (1, 0), (1, 3), (2, 0), (2, 1), (2, 3), (3, 0), (3, 1), (3, 3), (4, 0), (4, 1), (4, 3), (5, 0), (5, 3), (6, 0), (6, 3), (7, 0), (7, 1), (7, 2), (7, 3)])


def aes(text, key):
    pad = 16 - len(text) % 16
    text = text + bytearray([pad] * pad)
    encryptor = AES.new(key, 2, b"0102030405060708")
    ciphertext = encryptor.encrypt(text)
    return base64.b64encode(ciphertext)

aes(text=b'{"ids": [347230, 496619464, 405998841, 28012031], "br": 320000, "csrf_token": ""}', key=b'0CoJUm6Qyw8W8jud')

b'{"ids": [347230, 496619464, 405998841, 28012031], "br": 320000, "csrf_token": ""}\x0f\x0f\x0f\x0f\x0f\x0f\x0f\x0f\x0f\x0f\x0f\x0f\x0f\x0f\x0f'

{_state=<Cryptodome.Util._raw_api.SmartPointer object at 0x7f925764db80>, block_size=16, iv=b'0102030405060708', IV=b'0102030405060708', _next=[<bound method CbcMode.encrypt of <Cryptodome.Cipher._mode_cbc.CbcMode object at 0x7f925764dd60>>, <bound method CbcMode.decrypt of <Cryptodome.Cipher._mode_cbc.CbcMode object at 0x7f925764dd60>>]}

{_state=<Cryptodome.Util._raw_api.SmartPointer object at 0x7f925764db80>, block_size=16, iv=b'0102030405060708', IV=b'0102030405060708', _next=[<bound method CbcMode.encrypt of <Cryptodome.Cipher._mode_cbc.CbcMode object at 0x7f925764dd60>>]}


def _readSets(fp: BinaryIO, file_dims=None) -> (str,_HeaderDims):
        """
        :param fp: BinaryIO object.
        :return tuple: (coefficient_name, header_sets)
        """
        Coefficient, SetList, SetStatus, ElementList = HarFileIO._readSetElementInfoRecord(fp)

        set_names = [name.strip() for name in SetList]

        idim = 0
        header_sets = []
        processedSet = OrderedDict()
        for name, status in zip(set_names, SetStatus):
            if status == 'k':
                if name not in processedSet:
                    processedSet[name] = HarFileIO._readCharVec(fp, itemsize=12, use_unicode=is_unicode, size=tuple([file_dims[idim]]), dtype="<U12")
                header_sets.append(_HeaderSet(name=name, status=status, dim_desc=[item.strip() for item in processedSet[name]], dim_size= file_dims[idim]))
            elif status == 'u':
                header_sets.append(_HeaderSet(name=name, status=status, dim_desc=None, dim_size= file_dims[idim]))
            elif status == 'e':
                header_sets.append(_HeaderSet(name=name, status=status, dim_desc=ElementList.pop(0), dim_size= file_dims[idim]))
            idim += 1

        return Coefficient, _HeaderDims(header_sets)

_readSets(fp=<_io.BufferedReader name='/local/rcs/XXX/code/pytrace-collector/logs/pypibugs/tried/GEMPACKsoftware+HARPY/GEMPACKsoftware+HARPY/test_remove_header_array.har'>, file_dims=(2, 2, 1, 1, 1, 1, 1))

[<harpy._header_sets._HeaderSet object at 0x7fd016391130>]

[<harpy._header_sets._HeaderSet object at 0x7fd016391130>, <harpy._header_sets._HeaderSet object at 0x7fd0163912e0>]

OrderedDict([('SimpleSet', array(['A           ', 'B           '], dtype='<U12'))])

OrderedDict([('SimpleSet', array(['A           ', 'B           '], dtype='<U12')), ('SimpleSet2', array(['I           ', 'II          '], dtype='<U12'))])


def check_data(a, b):
    if not isinstance(a, np.ndarray):
        a = np.array(a)

    if not isinstance(b, np.ndarray):
        b = np.array(b)

    if type(a) != type(b):
        raise ValueError("Type mismatch: %s and %s" % (type(a), type(b)))

    if a.size != b.size:
        raise ValueError("Arrays must be equal in length.")
    return a, b

check_data(a=[], b=1)


def is_image_file(file_name):
    """
    Check if the given file name has an image file extension.

    :param file_name: The name of the file to check.
    :return: True if the file is an image, False otherwise.
    """
    file_name = str(file_name)  # Convert file_name to string
    return any(file_name.endswith(ext) for ext in IMAGE_EXTENSIONS)

is_image_file(file_name=PosixPath('/tmp/tmpcr1f5en7/.gitignore'))


def cd(args: list) -> None:
    """
        Change the current working directory of the device.

        While this method does not actually change any directories,
        it simply updates the value in the file_manager_state property
        that keeps record of the current directory.

        Before changing directories though, some checks are performed
        on the device to at least ensure that the destination directory
        exists.

        :param args:
        :return:
    """

    if len(args) <= 0:
        click.secho('Usage: cd <destination directory>', bold=True)
        return

    path = args[0]
    current_dir = pwd()

    # nothing to do
    if path == '.':
        return

    # moving one directory back
    if path == '..':

        split_path = os.path.split(current_dir)

        # nothing to do if we are already at root
        if len(split_path) == 1:
            return

        new_path = ''.join(split_path[:-1])
        click.secho(new_path, fg='green', bold=True)

        file_manager_state.cwd = new_path

        return

    # if we got an absolute path, check if the path
    # actually exists, and then cd to it if we can
    if os.path.isabs(path):

        # assume the path does not exist by default
        does_exist = False

        # check for existence based on the runtime
        if device_state.platform == Ios:
            does_exist = _path_exists_ios(path)

        if device_state.platform == Android:
            does_exist = _path_exists_android(path)

        # if we checked with the device that the path exists
        # and it did, update the state manager, otherwise
        # show an error that the path may be invalid
        if does_exist:
            click.secho(path, fg='green', bold=True)

            file_manager_state.cwd = path
            return

        else:
            click.secho('Invalid path: `{0}`'.format(path), fg='red')

    # directory is not absolute, tack it on at the end and
    # see if its legit.
    else:

        proposed_path = device_state.platform.path_separator.join([current_dir, path])

        # assume the proposed_path does not exist by default
        does_exist = False

        # check for existence based on the runtime
        if device_state.platform == Ios:
            does_exist = _path_exists_ios(proposed_path)

        if device_state.platform == Android:
            does_exist = _path_exists_android(proposed_path)

        # if we checked with the device that the path exists
        # and it did, update the state manager, otherwise
        # show an error that the path may be invalid
        if does_exist:
            click.secho(proposed_path, fg='green', bold=True)

            file_manager_state.cwd = proposed_path
            return

        else:
            click.secho('Invalid path: `{0}`'.format(proposed_path), fg='red')

cd(args=['/foo/bar/baz'])


hook_names = [_name(hook) for hook in _normal_hooks(hooks)]


def check_impl_detail(**guards):
    """This function returns True or False depending on the host platform.
       Examples:
          if check_impl_detail():               # only on CPython (default)
          if check_impl_detail(jython=True):    # only on Jython
          if check_impl_detail(cpython=False):  # everywhere except on CPython
    """
    guards, default = _parse_guards(guards)
    return guards.get(sys.implementation.name, default)

check_impl_detail(guards={})


def quat_from_axis_angle(axis, angle):
        axis_ = np.array(axis, dtype=np.float64)
        half_angle = angle * 0.5
        ret = np.empty(4)
        ret[0] = math.cos(half_angle)
        ret[1:4] = math.sin(half_angle) * axis_
        return ret

quat_from_axis_angle(axis=[1.0, 0.0, 0.0], angle=6.1086523819801535)


def move_is_sublist(letter_list_1, letter_list_2):
    letter_counter_1 = collections.Counter(letter_list_1)
    letter_counter_2 = collections.Counter(letter_list_2)
    for letter, cardinality in letter_counter_1.items():
        if cardinality > letter_counter_2[letter]:
            # print('Not enough {} tiles in rack.'.format(letter))
            return False

    return True

move_is_sublist(letter_list_1=[1, 2, 3], letter_list_2=[1, 2, 3, 4])


def __setitem__(self, key, value):
        def single(d, target, value):
            d[target] = value

        def unaliased(d, key, value):
            super(AliasDict, d).__setitem__(key, value)

        return self._handle(key, value, single, None, unaliased)

__setitem__(self={}, key='make-sudouser', value=<Task 'make_sudouser'>, __class__=<class 'invoke.vendor.lexicon.alias_dict.AliasDict'>)

<function AliasDict.__setitem__.<locals>.single at 0x7f2efe445550>

<function AliasDict.__setitem__.<locals>.unaliased at 0x7f2efe445670>


def encode(self, input: Tensor) -> List[Tensor]:
        """
        Encodes the input by passing through the encoder network
        and returns the latent codes.
        :param input: (Tensor) Input tensor to encoder [N x C x H x W]
        :return: (Tensor) List of latent codes
        """
        result = self.encoder(input)

        result = torch.flatten(result, start_dim=1)
        result = self.fc(result)
        # Split the result into mu and var components
        # of the latent Gaussian distribution
        mu = self.fc_mu(result)
        log_var = self.fc_var(result)

        return [mu, log_var]

encode(self=BetaTCVAE(  (encoder): Sequential(    (0): Sequential(      (0): Conv2d(3, 32, kernel_size=(4, 4), stride=(2, 2), padding=(1, 1))      (1): LeakyReLU(negative_slope=0.01)    )    (1): Sequential(      (0): Conv2d(32, 32, kernel_size=(4, 4), stride=(2, 2), padding=(1, 1))      (1): LeakyReLU(negative_slope=0.01)    )    (2): Sequential(      (0): Conv2d(32, 32, kernel_size=(4, 4), stride=(2, 2), padding=(1, 1))      (1): LeakyReLU(negative_slope=0.01)    )    (3): Sequential(      (0): Conv2d(32, 32, kernel_size=(4, 4), stride=(2, 2), padding=(1, 1))      (1): LeakyReLU(negative_slope=0.01)    )  )  (fc): Linear(in_features=512, out_features=256, bias=True)  (fc_mu): Linear(in_features=256, out_features=64, bias=True)  (fc_var): Linear(in_features=256, out_features=64, bias=True)  (decoder_input): Linear(in_features=64, out_features=512, bias=True)  (decoder): Sequential(    (0): Sequential(      (0): ConvTranspose2d(32, 32, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), output_padding=(1, 1))      (1): LeakyReLU(negative_slope=0.01)    )    (1): Sequential(      (0): ConvTranspose2d(32, 32, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), output_padding=(1, 1))      (1): LeakyReLU(negative_slope=0.01)    )    (2): Sequential(      (0): ConvTranspose2d(32, 32, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), output_padding=(1, 1))      (1): 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): LeakyReLU(negative_slope=0.01)    (2): Conv2d(32, 3, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))    (3): Tanh()  )), input=tensor([[[[ 5.3185e-01, -3.9774e-01,  3.6972e-01,  ...,  1.1367e+00,            1.1521e+00, -1.6743e+00],          [ 2.0578e+00,  1.9519e+00, -2.8100e+00,  ..., -5.8015e-01,           -1.3863e+00,  2.3038e-01],          [ 7.4288e-01,  6.0677e-01, -3.6157e-01,  ...,  2.7795e-01,           -1.0206e+00,  8.1242e-02],          ...,          [-7.0247e-01,  1.4037e+00, -1.1149e+00,  ..., -1.4894e+00,           -2.4559e-01, -1.8430e+00],          [-9.3718e-01, -1.2054e+00,  1.2919e+00,  ..., -5.7453e-01,            3.6835e-01, -7.4638e-01],          [-2.2104e-01, -5.9905e-01,  8.6197e-01,  ..., -3.7539e-01,           -1.2531e+00,  1.1781e-01]],         [[-2.0944e+00, -7.4385e-01, -9.7033e-01,  ..., -7.8675e-02,           -7.4620e-02, -1.6986e+00],          [ 4.0385e-01, -1.2824e+00,  6.0149e-02,  ..., -3.6837e-01,           -1.0242e-01, -8.2039e-02],          [-9.8629e-01, -7.1538e-01,  1.9335e+00,  ...,  9.1957e-01,            5.5281e-01,  1.2864e+00],          ...,          [ 7.5726e-02,  2.4742e-01, -2.4193e-01,  ...,  8.5353e-01,           -2.7577e-01, -2.6538e+00],          [-9.8466e-03, -9.5950e-01,  7.3757e-02,  ...,  8.5767e-02,            1.4790e+00,  5.5942e-01],          [ 1.2253e+00, -7.8919e-01, -2.9739e-01,  ..., -3.1689e-01,           -5.6716e-01,  7.9165e-01]],         [[-4.0525e-01, -8.3349e-01,  5.2918e-01,  ...,  7.9677e-01,           -1.0793e+00, -3.8235e-01],          [ 1.7477e+00,  2.9892e-01, -1.1484e+00,  ...,  9.3641e-01,            9.4447e-01, -1.2406e+00],          [ 1.4655e-01, -2.0048e+00, -1.4054e+00,  ..., -5.4709e-01,            2.0894e-01,  1.0476e-01],          ...,          [ 1.0665e-01,  1.9868e-01,  2.2229e-01,  ..., -2.8227e-01,            1.0278e+00,  1.2411e-01],          [-9.5577e-01,  1.8679e-01,  1.3016e+00,  ..., -9.7086e-01,           -1.0557e+00,  6.7745e-02],          [ 1.4790e+00, -2.0436e+00, -1.1996e+00,  ..., -6.4002e-01,            2.2152e+00, -9.9841e-01]]],        [[[ 1.5455e-01,  2.8293e+00,  1.5297e+00,  ..., -8.6605e-01,            1.0608e+00,  1.1515e-01],          [ 1.4160e+00, -1.0184e+00,  9.7726e-01,  ...,  1.1619e+00,            6.8690e-01,  1.3305e+00],          [ 1.0506e+00, -7.1100e-01,  1.3180e-01,  ..., -4.9396e-02,            5.1341e-02,  8.4380e-01],          ...,          [ 2.1367e-02,  8.5591e-01,  7.2118e-03,  ...,  9.6486e-01,            3.9966e-01,  2.8569e-01],          [ 1.5647e+00, -1.1883e-01, -6.4004e-02,  ..., -1.3983e+00,           -4.6075e-01,  8.1895e-02],          [ 1.7330e+00,  4.0375e-01, -1.6357e-01,  ...,  3.0821e-03,            5.5183e-01,  8.5084e-01]],         [[-1.5776e+00,  5.9163e-01,  1.3641e+00,  ...,  5.6345e-01,            8.4972e-01, -6.4639e-01],          [ 1.3402e+00, -1.6378e-01, -1.1405e+00,  ...,  1.0874e-01,           -1.8486e+00, -5.0235e-01],          [ 5.7208e-01,  1.6543e+00,  1.3152e-01,  ...,  1.2373e+00,            8.2186e-01,  4.3303e-01],          ...,          [-1.1077e+00,  1.7493e-01,  6.4322e-01,  ..., -7.8351e-01,           -5.3578e-01,  1.4140e+00],          [-9.0306e-01,  1.8420e+00, -1.0662e+00,  ..., -5.9949e-02,            1.3193e+00,  3.2077e-02],          [ 5.4261e-01, -4.4406e-02,  4.6330e-02,  ..., -9.6119e-01,            6.7180e-01, -4.8122e-02]],         [[ 8.6250e-01, -6.7066e-02, -3.5274e-01,  ...,  1.9979e-01,           -1.6411e+00, -5.3606e-01],          [ 1.1685e+00, -2.0047e-01,  3.0468e-01,  ..., -1.0746e+00,           -9.1865e-01, -1.1219e+00],          [ 7.6191e-01, -3.8277e-01,  6.3079e-01,  ..., -2.4246e+00,           -2.6817e-01,  7.6165e-01],          ...,          [-7.7297e-01, -4.5526e-01, -6.6731e-03,  ..., -1.3138e+00,           -7.1513e-01, -4.9017e-01],          [ 1.0308e+00,  1.2848e+00,  5.1048e-01,  ..., -1.6668e+00,           -2.1581e-01,  1.3934e+00],          [-1.3691e+00,  9.5055e-01,  9.4900e-01,  ..., -2.6176e-02,            5.8659e-01, -2.2248e+00]]],        [[[ 6.9125e-01, -1.0737e+00, -6.2224e-01,  ..., -6.9978e-01,           -1.5117e-01,  1.2280e+00],          [ 8.1159e-01, -4.8034e-01,  4.1112e-01,  ...,  6.2597e-01,            9.8856e-01,  3.8114e-01],          [ ...7472e+00],          [-5.3230e-01, -1.8319e+00, -1.4415e+00,  ...,  1.5285e+00,            5.9762e-01,  6.3045e-01],          [-8.2676e-01,  1.1276e-01,  6.3077e-01,  ...,  8.4853e-01,           -6.3750e-01,  4.9089e-01]]],        [[[ 4.3172e-01, -1.0873e+00, -9.0388e-01,  ..., -3.2324e-01,           -4.4410e-01, -7.3016e-01],          [ 1.3609e+00, -2.0047e-01, -1.1894e+00,  ...,  3.1399e-01,            1.9187e-01, -1.2643e-01],          [-8.1190e-01,  3.9284e-01, -1.2749e+00,  ..., -7.3253e-01,           -2.4893e+00,  2.9426e-01],          ...,          [-3.4773e-01,  7.2801e-01,  4.3619e-01,  ..., -6.3637e-01,            1.1142e+00, -4.1677e-01],          [ 2.0785e+00, -2.3168e+00,  7.7228e-02,  ...,  2.9332e-01,            2.2538e+00,  1.2741e+00],          [ 2.5713e-01,  2.7087e-01, -8.5220e-01,  ..., -8.5929e-01,            2.1949e-01,  1.3974e-01]],         [[ 1.3550e+00, -1.0758e+00,  1.1293e+00,  ..., -1.0205e+00,           -1.4944e-01, -1.2729e-01],          [-1.4885e+00, -3.5000e-01, -1.6846e+00,  ..., -1.0720e+00,           -2.9126e+00, -1.1050e-01],          [-2.5364e+00,  1.5951e+00, -3.5153e-01,  ...,  1.3554e+00,            9.6909e-01, -5.9874e-01],          ...,          [ 1.6880e+00, -3.5601e-01, -1.3960e+00,  ...,  1.3715e-01,           -5.1912e-01, -5.8030e-01],          [ 4.0335e-01,  6.5779e-01, -5.9033e-01,  ...,  6.4427e-01,           -6.5489e-01,  1.4476e+00],          [-6.4476e-01, -9.0709e-01, -5.4367e-01,  ..., -2.2654e-01,            2.4975e+00,  1.5439e+00]],         [[-5.2828e-01, -1.0348e-01,  3.0785e-01,  ..., -2.1140e+00,           -1.5042e+00,  8.4573e-02],          [-1.1699e+00, -8.7621e-01,  1.2186e+00,  ...,  1.0481e+00,            6.7535e-01, -2.4795e+00],          [-2.1606e-01,  1.4074e+00,  4.5803e-01,  ..., -4.9758e-01,           -5.3421e-02, -1.6878e+00],          ...,          [-8.0470e-01, -6.5579e-02, -1.4215e+00,  ..., -9.2709e-01,           -1.3101e+00, -6.3970e-01],          [ 8.2744e-01,  6.1637e-01,  7.9837e-03,  ..., -1.1195e+00,           -1.0946e+00,  9.7312e-01],          [-1.7113e+00, -1.2098e+00,  1.0424e-01,  ..., -2.6068e-01,           -7.1830e-01,  1.0582e+00]]],        [[[ 1.2083e+00,  2.2576e-01,  2.2029e+00,  ...,  1.6064e-01,           -6.7711e-01, -8.1935e-01],          [-1.5649e+00,  1.8701e-01,  6.6335e-01,  ..., -3.2193e-01,            1.7482e+00,  1.2873e+00],          [ 2.4682e-01, -3.3585e-02, -7.3295e-01,  ..., -9.7423e-01,           -5.0875e-01,  1.5034e+00],          ...,          [-1.6163e-04, -3.4227e-02, -2.4157e-01,  ..., -1.0951e+00,            5.8072e-01,  2.5867e-01],          [ 5.9858e-01, -1.4594e+00, -4.2557e-01,  ..., -1.4083e+00,            1.0062e+00, -2.6702e+00],          [ 2.2283e-02,  1.9899e-01, -3.1685e-01,  ..., -9.9946e-01,           -3.1641e-01, -2.1764e+00]],         [[ 2.8564e-01,  4.7435e-01,  1.3970e+00,  ...,  1.4685e-01,            5.1340e-01,  4.2743e-01],          [-1.1349e+00,  1.7398e-01,  8.5008e-02,  ..., -3.1036e-01,            1.3757e+00, -1.1701e+00],          [-5.9442e-01,  3.3539e-01,  1.0349e+00,  ..., -2.2516e+00,            5.1274e-01, -2.2695e-02],          ...,          [ 2.6707e-01, -3.9661e-02,  7.8258e-01,  ...,  1.6181e-02,           -1.0170e+00, -5.4829e-01],          [-6.0622e-01,  1.5736e+00, -7.9128e-01,  ..., -1.1797e-01,           -1.4455e+00,  8.4701e-01],          [-1.5520e+00, -1.6892e+00, -7.7782e-01,  ..., -4.0195e-01,           -4.3646e-01,  2.6970e-01]],         [[ 6.9032e-01,  7.9203e-01,  4.5647e-02,  ...,  6.9158e-01,            8.2187e-01,  2.1916e+00],          [ 8.0458e-01,  1.4788e+00, -1.6513e-01,  ...,  1.0400e+00,            9.9060e-01, -3.3930e-02],          [ 1.4022e-01, -8.6108e-01, -3.1557e-01,  ...,  5.9925e-01,            1.8452e+00,  1.8993e+00],          ...,          [ 9.7114e-01,  2.4893e-01,  8.9429e-01,  ...,  1.3282e+00,           -6.3248e-02,  4.3927e-02],          [-9.2447e-01,  3.5266e-01,  5.7714e-01,  ...,  1.0636e+00,            2.2731e-01, -8.6034e-01],          [-1.1792e+00,  2.3629e-01, -1.5843e+00,  ..., -3.3812e-01,           -1.5923e+00, -5.8710e-01]]]]), 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', Sequential(  (0): Sequential(    (0): Conv2d(3, 32, kernel_size=(4, 4), stride=(2, 2), padding=(1, 1))    (1): LeakyReLU(negative_slope=0.01)  )  (1): Sequential(    (0): Conv2d(32, 32, kernel_size=(4, 4), stride=(2, 2), padding=(1, 1))    (1): LeakyReLU(negative_slope=0.01)  )  (2): Sequential(    (0): Conv2d(32, 32, kernel_size=(4, 4), stride=(2, 2), padding=(1, 1))    (1): LeakyReLU(negative_slope=0.01)  )  (3): Sequential(    (0): Conv2d(32, 32, kernel_size=(4, 4), stride=(2, 2), padding=(1, 1))    (1): LeakyReLU(negative_slope=0.01)  ))), ('fc', Linear(in_features=512, out_features=256, bias=True)), ('fc_mu', Linear(in_features=256, out_features=64, bias=True)), ('fc_var', Linear(in_features=256, out_features=64, bias=True)), ('decoder_input', Linear(in_features=64, out_features=512, bias=True)), ('decoder', Sequential(  (0): Sequential(    (0): ConvTranspose2d(32, 32, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), output_padding=(1, 1))    (1): LeakyReLU(negative_slope=0.01)  )  (1): Sequential(    (0): ConvTranspose2d(32, 32, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), output_padding=(1, 1))    (1): LeakyReLU(negative_slope=0.01)  )  (2): Sequential(    (0): ConvTranspose2d(32, 32, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), output_padding=(1, 1))    (1): 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): LeakyReLU(negative_slope=0.01)  (2): Conv2d(32, 3, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))  (3): Tanh()))]), self._non_persistent_buffers_set=set(), self._parameters=OrderedDict(), self._state_dict_hooks=OrderedDict(), self._state_dict_pre_hooks=OrderedDict(), self.alpha=1.0, self.anneal_steps=100, self.beta=6.0, self.gamma=1.0, self.latent_dim=64, self.training=True)

Input: tensor([[[[ 5.3185e-01, -3.9774e-01,  3.6972e-01,  ...,  1.1367e+00,            1.1521e+00, -1.6743e+00],          [ 2.0578e+00,  1.9519e+00, -2.8100e+00,  ..., -5.8015e-01,           -1.3863e+00,  2.3038e-01],          [ 7.4288e-01,  6.0677e-01, -3.6157e-01,  ...,  2.7795e-01,           -1.0206e+00,  8.1242e-02],          ...,          [-7.0247e-01,  1.4037e+00, -1.1149e+00,  ..., -1.4894e+00,           -2.4559e-01, -1.8430e+00],          [-9.3718e-01, -1.2054e+00,  1.2919e+00,  ..., -5.7453e-01,            3.6835e-01, -7.4638e-01],          [-2.2104e-01, -5.9905e-01,  8.6197e-01,  ..., -3.7539e-01,           -1.2531e+00,  1.1781e-01]],         [[-2.0944e+00, -7.4385e-01, -9.7033e-01,  ..., -7.8675e-02,           -7.4620e-02, -1.6986e+00],          [ 4.0385e-01, -1.2824e+00,  6.0149e-02,  ..., -3.6837e-01,           -1.0242e-01, -8.2039e-02],          [-9.8629e-01, -7.1538e-01,  1.9335e+00,  ...,  9.1957e-01,            5.5281e-01,  1.2864e+00],          ...,          [ 7.5726e-02,  2.4742e-01, -2.4193e-01,  ...,  8.5353e-01,           -2.7577e-01, -2.6538e+00],          [-9.8466e-03, -9.5950e-01,  7.3757e-02,  ...,  8.5767e-02,            1.4790e+00,  5.5942e-01],          [ 1.2253e+00, -7.8919e-01, -2.9739e-01,  ..., -3.1689e-01,           -5.6716e-01,  7.9165e-01]],         [[-4.0525e-01, -8.3349e-01,  5.2918e-01,  ...,  7.9677e-01,           -1.0793e+00, -3.8235e-01],          [ 1.7477e+00,  2.9892e-01, -1.1484e+00,  ...,  9.3641e-01,            9.4447e-01, -1.2406e+00],          [ 1.4655e-01, -2.0048e+00, -1.4054e+00,  ..., -5.4709e-01,            2.0894e-01,  1.0476e-01],          ...,          [ 1.0665e-01,  1.9868e-01,  2.2229e-01,  ..., -2.8227e-01,            1.0278e+00,  1.2411e-01],          [-9.5577e-01,  1.8679e-01,  1.3016e+00,  ..., -9.7086e-01,           -1.0557e+00,  6.7745e-02],          [ 1.4790e+00, -2.0436e+00, -1.1996e+00,  ..., -6.4002e-01,            2.2152e+00, -9.9841e-01]]],        [[[ 1.5455e-01,  2.8293e+00,  1.5297e+00,  ..., -8.6605e-01,            1.0608e+00,  1.1515e-01],          [ 1.4160e+00, -1.0184e+00,  9.7726e-01,  ...,  1.1619e+00,            6.8690e-01,  1.3305e+00],          [ 1.0506e+00, -7.1100e-01,  1.3180e-01,  ..., -4.9396e-02,            5.1341e-02,  8.4380e-01],          ...,          [ 2.1367e-02,  8.5591e-01,  7.2118e-03,  ...,  9.6486e-01,            3.9966e-01,  2.8569e-01],          [ 1.5647e+00, -1.1883e-01, -6.4004e-02,  ..., -1.3983e+00,           -4.6075e-01,  8.1895e-02],          [ 1.7330e+00,  4.0375e-01, -1.6357e-01,  ...,  3.0821e-03,            5.5183e-01,  8.5084e-01]],         [[-1.5776e+00,  5.9163e-01,  1.3641e+00,  ...,  5.6345e-01,            8.4972e-01, -6.4639e-01],          [ 1.3402e+00, -1.6378e-01, -1.1405e+00,  ...,  1.0874e-01,           -1.8486e+00, -5.0235e-01],          [ 5.7208e-01,  1.6543e+00,  1.3152e-01,  ...,  1.2373e+00,            8.2186e-01,  4.3303e-01],          ...,          [-1.1077e+00,  1.7493e-01,  6.4322e-01,  ..., -7.8351e-01,           -5.3578e-01,  1.4140e+00],          [-9.0306e-01,  1.8420e+00, -1.0662e+00,  ..., -5.9949e-02,            1.3193e+00,  3.2077e-02],          [ 5.4261e-01, -4.4406e-02,  4.6330e-02,  ..., -9.6119e-01,            6.7180e-01, -4.8122e-02]],         [[ 8.6250e-01, -6.7066e-02, -3.5274e-01,  ...,  1.9979e-01,           -1.6411e+00, -5.3606e-01],          [ 1.1685e+00, -2.0047e-01,  3.0468e-01,  ..., -1.0746e+00,           -9.1865e-01, -1.1219e+00],          [ 7.6191e-01, -3.8277e-01,  6.3079e-01,  ..., -2.4246e+00,           -2.6817e-01,  7.6165e-01],          ...,          [-7.7297e-01, -4.5526e-01, -6.6731e-03,  ..., -1.3138e+00,           -7.1513e-01, -4.9017e-01],          [ 1.0308e+00,  1.2848e+00,  5.1048e-01,  ..., -1.6668e+00,           -2.1581e-01,  1.3934e+00],          [-1.3691e+00,  9.5055e-01,  9.4900e-01,  ..., -2.6176e-02,            5.8659e-01, -2.2248e+00]]],        [[[ 6.9125e-01, -1.0737e+00, -6.2224e-01,  ..., -6.9978e-01,           -1.5117e-01,  1.2280e+00],          [ 8.1159e-01, -4.8034e-01,  4.1112e-01,  ...,  6.2597e-01,            9.8856e-01,  3.8114e-01],          [ ...7472e+00],          [-5.3230e-01, -1.8319e+00, -1.4415e+00,  ...,  1.5285e+00,            5.9762e-01,  6.3045e-01],          [-8.2676e-01,  1.1276e-01,  6.3077e-01,  ...,  8.4853e-01,           -6.3750e-01,  4.9089e-01]]],        [[[ 4.3172e-01, -1.0873e+00, -9.0388e-01,  ..., -3.2324e-01,           -4.4410e-01, -7.3016e-01],          [ 1.3609e+00, -2.0047e-01, -1.1894e+00,  ...,  3.1399e-01,            1.9187e-01, -1.2643e-01],          [-8.1190e-01,  3.9284e-01, -1.2749e+00,  ..., -7.3253e-01,           -2.4893e+00,  2.9426e-01],          ...,          [-3.4773e-01,  7.2801e-01,  4.3619e-01,  ..., -6.3637e-01,            1.1142e+00, -4.1677e-01],          [ 2.0785e+00, -2.3168e+00,  7.7228e-02,  ...,  2.9332e-01,            2.2538e+00,  1.2741e+00],          [ 2.5713e-01,  2.7087e-01, -8.5220e-01,  ..., -8.5929e-01,            2.1949e-01,  1.3974e-01]],         [[ 1.3550e+00, -1.0758e+00,  1.1293e+00,  ..., -1.0205e+00,           -1.4944e-01, -1.2729e-01],          [-1.4885e+00, -3.5000e-01, -1.6846e+00,  ..., -1.0720e+00,           -2.9126e+00, -1.1050e-01],          [-2.5364e+00,  1.5951e+00, -3.5153e-01,  ...,  1.3554e+00,            9.6909e-01, -5.9874e-01],          ...,          [ 1.6880e+00, -3.5601e-01, -1.3960e+00,  ...,  1.3715e-01,           -5.1912e-01, -5.8030e-01],          [ 4.0335e-01,  6.5779e-01, -5.9033e-01,  ...,  6.4427e-01,           -6.5489e-01,  1.4476e+00],          [-6.4476e-01, -9.0709e-01, -5.4367e-01,  ..., -2.2654e-01,            2.4975e+00,  1.5439e+00]],         [[-5.2828e-01, -1.0348e-01,  3.0785e-01,  ..., -2.1140e+00,           -1.5042e+00,  8.4573e-02],          [-1.1699e+00, -8.7621e-01,  1.2186e+00,  ...,  1.0481e+00,            6.7535e-01, -2.4795e+00],          [-2.1606e-01,  1.4074e+00,  4.5803e-01,  ..., -4.9758e-01,           -5.3421e-02, -1.6878e+00],          ...,          [-8.0470e-01, -6.5579e-02, -1.4215e+00,  ..., -9.2709e-01,           -1.3101e+00, -6.3970e-01],          [ 8.2744e-01,  6.1637e-01,  7.9837e-03,  ..., -1.1195e+00,           -1.0946e+00,  9.7312e-01],          [-1.7113e+00, -1.2098e+00,  1.0424e-01,  ..., -2.6068e-01,           -7.1830e-01,  1.0582e+00]]],        [[[ 1.2083e+00,  2.2576e-01,  2.2029e+00,  ...,  1.6064e-01,           -6.7711e-01, -8.1935e-01],          [-1.5649e+00,  1.8701e-01,  6.6335e-01,  ..., -3.2193e-01,            1.7482e+00,  1.2873e+00],          [ 2.4682e-01, -3.3585e-02, -7.3295e-01,  ..., -9.7423e-01,           -5.0875e-01,  1.5034e+00],          ...,          [-1.6163e-04, -3.4227e-02, -2.4157e-01,  ..., -1.0951e+00,            5.8072e-01,  2.5867e-01],          [ 5.9858e-01, -1.4594e+00, -4.2557e-01,  ..., -1.4083e+00,            1.0062e+00, -2.6702e+00],          [ 2.2283e-02,  1.9899e-01, -3.1685e-01,  ..., -9.9946e-01,           -3.1641e-01, -2.1764e+00]],         [[ 2.8564e-01,  4.7435e-01,  1.3970e+00,  ...,  1.4685e-01,            5.1340e-01,  4.2743e-01],          [-1.1349e+00,  1.7398e-01,  8.5008e-02,  ..., -3.1036e-01,            1.3757e+00, -1.1701e+00],          [-5.9442e-01,  3.3539e-01,  1.0349e+00,  ..., -2.2516e+00,            5.1274e-01, -2.2695e-02],          ...,          [ 2.6707e-01, -3.9661e-02,  7.8258e-01,  ...,  1.6181e-02,           -1.0170e+00, -5.4829e-01],          [-6.0622e-01,  1.5736e+00, -7.9128e-01,  ..., -1.1797e-01,           -1.4455e+00,  8.4701e-01],          [-1.5520e+00, -1.6892e+00, -7.7782e-01,  ..., -4.0195e-01,           -4.3646e-01,  2.6970e-01]],         [[ 6.9032e-01,  7.9203e-01,  4.5647e-02,  ...,  6.9158e-01,            8.2187e-01,  2.1916e+00],          [ 8.0458e-01,  1.4788e+00, -1.6513e-01,  ...,  1.0400e+00,            9.9060e-01, -3.3930e-02],          [ 1.4022e-01, -8.6108e-01, -3.1557e-01,  ...,  5.9925e-01,            1.8452e+00,  1.8993e+00],          ...,          [ 9.7114e-01,  2.4893e-01,  8.9429e-01,  ...,  1.3282e+00,           -6.3248e-02,  4.3927e-02],          [-9.2447e-01,  3.5266e-01,  5.7714e-01,  ...,  1.0636e+00,            2.2731e-01, -8.6034e-01],          [-1.1792e+00,  2.3629e-01, -1.5843e+00,  ..., -3.3812e-01,           -1.5923e+00, -5.8710e-01]]]])

Input: tensor([[[[ 5.3185e-01, -3.9774e-01,  3.6972e-01,  ...,  1.1367e+00,            1.1521e+00, -1.6743e+00],          [ 2.0578e+00,  1.9519e+00, -2.8100e+00,  ..., -5.8015e-01,           -1.3863e+00,  2.3038e-01],          [ 7.4288e-01,  6.0677e-01, -3.6157e-01,  ...,  2.7795e-01,           -1.0206e+00,  8.1242e-02],          ...,          [-7.0247e-01,  1.4037e+00, -1.1149e+00,  ..., -1.4894e+00,           -2.4559e-01, -1.8430e+00],          [-9.3718e-01, -1.2054e+00,  1.2919e+00,  ..., -5.7453e-01,            3.6835e-01, -7.4638e-01],          [-2.2104e-01, -5.9905e-01,  8.6197e-01,  ..., -3.7539e-01,           -1.2531e+00,  1.1781e-01]],         [[-2.0944e+00, -7.4385e-01, -9.7033e-01,  ..., -7.8675e-02,           -7.4620e-02, -1.6986e+00],          [ 4.0385e-01, -1.2824e+00,  6.0149e-02,  ..., -3.6837e-01,           -1.0242e-01, -8.2039e-02],          [-9.8629e-01, -7.1538e-01,  1.9335e+00,  ...,  9.1957e-01,            5.5281e-01,  1.2864e+00],          ...,          [ 7.5726e-02,  2.4742e-01, -2.4193e-01,  ...,  8.5353e-01,           -2.7577e-01, -2.6538e+00],          [-9.8466e-03, -9.5950e-01,  7.3757e-02,  ...,  8.5767e-02,            1.4790e+00,  5.5942e-01],          [ 1.2253e+00, -7.8919e-01, -2.9739e-01,  ..., -3.1689e-01,           -5.6716e-01,  7.9165e-01]],         [[-4.0525e-01, -8.3349e-01,  5.2918e-01,  ...,  7.9677e-01,           -1.0793e+00, -3.8235e-01],          [ 1.7477e+00,  2.9892e-01, -1.1484e+00,  ...,  9.3641e-01,            9.4447e-01, -1.2406e+00],          [ 1.4655e-01, -2.0048e+00, -1.4054e+00,  ..., -5.4709e-01,            2.0894e-01,  1.0476e-01],          ...,          [ 1.0665e-01,  1.9868e-01,  2.2229e-01,  ..., -2.8227e-01,            1.0278e+00,  1.2411e-01],          [-9.5577e-01,  1.8679e-01,  1.3016e+00,  ..., -9.7086e-01,           -1.0557e+00,  6.7745e-02],          [ 1.4790e+00, -2.0436e+00, -1.1996e+00,  ..., -6.4002e-01,            2.2152e+00, -9.9841e-01]]],        [[[ 1.5455e-01,  2.8293e+00,  1.5297e+00,  ..., -8.6605e-01,            1.0608e+00,  1.1515e-01],          [ 1.4160e+00, -1.0184e+00,  9.7726e-01,  ...,  1.1619e+00,            6.8690e-01,  1.3305e+00],          [ 1.0506e+00, -7.1100e-01,  1.3180e-01,  ..., -4.9396e-02,            5.1341e-02,  8.4380e-01],          ...,          [ 2.1367e-02,  8.5591e-01,  7.2118e-03,  ...,  9.6486e-01,            3.9966e-01,  2.8569e-01],          [ 1.5647e+00, -1.1883e-01, -6.4004e-02,  ..., -1.3983e+00,           -4.6075e-01,  8.1895e-02],          [ 1.7330e+00,  4.0375e-01, -1.6357e-01,  ...,  3.0821e-03,            5.5183e-01,  8.5084e-01]],         [[-1.5776e+00,  5.9163e-01,  1.3641e+00,  ...,  5.6345e-01,            8.4972e-01, -6.4639e-01],          [ 1.3402e+00, -1.6378e-01, -1.1405e+00,  ...,  1.0874e-01,           -1.8486e+00, -5.0235e-01],          [ 5.7208e-01,  1.6543e+00,  1.3152e-01,  ...,  1.2373e+00,            8.2186e-01,  4.3303e-01],          ...,          [-1.1077e+00,  1.7493e-01,  6.4322e-01,  ..., -7.8351e-01,           -5.3578e-01,  1.4140e+00],          [-9.0306e-01,  1.8420e+00, -1.0662e+00,  ..., -5.9949e-02,            1.3193e+00,  3.2077e-02],          [ 5.4261e-01, -4.4406e-02,  4.6330e-02,  ..., -9.6119e-01,            6.7180e-01, -4.8122e-02]],         [[ 8.6250e-01, -6.7066e-02, -3.5274e-01,  ...,  1.9979e-01,           -1.6411e+00, -5.3606e-01],          [ 1.1685e+00, -2.0047e-01,  3.0468e-01,  ..., -1.0746e+00,           -9.1865e-01, -1.1219e+00],          [ 7.6191e-01, -3.8277e-01,  6.3079e-01,  ..., -2.4246e+00,           -2.6817e-01,  7.6165e-01],          ...,          [-7.7297e-01, -4.5526e-01, -6.6731e-03,  ..., -1.3138e+00,           -7.1513e-01, -4.9017e-01],          [ 1.0308e+00,  1.2848e+00,  5.1048e-01,  ..., -1.6668e+00,           -2.1581e-01,  1.3934e+00],          [-1.3691e+00,  9.5055e-01,  9.4900e-01,  ..., -2.6176e-02,            5.8659e-01, -2.2248e+00]]],        [[[ 6.9125e-01, -1.0737e+00, -6.2224e-01,  ..., -6.9978e-01,           -1.5117e-01,  1.2280e+00],          [ 8.1159e-01, -4.8034e-01,  4.1112e-01,  ...,  6.2597e-01,            9.8856e-01,  3.8114e-01],          [ ...7472e+00],          [-5.3230e-01, -1.8319e+00, -1.4415e+00,  ...,  1.5285e+00,            5.9762e-01,  6.3045e-01],          [-8.2676e-01,  1.1276e-01,  6.3077e-01,  ...,  8.4853e-01,           -6.3750e-01,  4.9089e-01]]],        [[[ 4.3172e-01, -1.0873e+00, -9.0388e-01,  ..., -3.2324e-01,           -4.4410e-01, -7.3016e-01],          [ 1.3609e+00, -2.0047e-01, -1.1894e+00,  ...,  3.1399e-01,            1.9187e-01, -1.2643e-01],          [-8.1190e-01,  3.9284e-01, -1.2749e+00,  ..., -7.3253e-01,           -2.4893e+00,  2.9426e-01],          ...,          [-3.4773e-01,  7.2801e-01,  4.3619e-01,  ..., -6.3637e-01,            1.1142e+00, -4.1677e-01],          [ 2.0785e+00, -2.3168e+00,  7.7228e-02,  ...,  2.9332e-01,            2.2538e+00,  1.2741e+00],          [ 2.5713e-01,  2.7087e-01, -8.5220e-01,  ..., -8.5929e-01,            2.1949e-01,  1.3974e-01]],         [[ 1.3550e+00, -1.0758e+00,  1.1293e+00,  ..., -1.0205e+00,           -1.4944e-01, -1.2729e-01],          [-1.4885e+00, -3.5000e-01, -1.6846e+00,  ..., -1.0720e+00,           -2.9126e+00, -1.1050e-01],          [-2.5364e+00,  1.5951e+00, -3.5153e-01,  ...,  1.3554e+00,            9.6909e-01, -5.9874e-01],          ...,          [ 1.6880e+00, -3.5601e-01, -1.3960e+00,  ...,  1.3715e-01,           -5.1912e-01, -5.8030e-01],          [ 4.0335e-01,  6.5779e-01, -5.9033e-01,  ...,  6.4427e-01,           -6.5489e-01,  1.4476e+00],          [-6.4476e-01, -9.0709e-01, -5.4367e-01,  ..., -2.2654e-01,            2.4975e+00,  1.5439e+00]],         [[-5.2828e-01, -1.0348e-01,  3.0785e-01,  ..., -2.1140e+00,           -1.5042e+00,  8.4573e-02],          [-1.1699e+00, -8.7621e-01,  1.2186e+00,  ...,  1.0481e+00,            6.7535e-01, -2.4795e+00],          [-2.1606e-01,  1.4074e+00,  4.5803e-01,  ..., -4.9758e-01,           -5.3421e-02, -1.6878e+00],          ...,          [-8.0470e-01, -6.5579e-02, -1.4215e+00,  ..., -9.2709e-01,           -1.3101e+00, -6.3970e-01],          [ 8.2744e-01,  6.1637e-01,  7.9837e-03,  ..., -1.1195e+00,           -1.0946e+00,  9.7312e-01],          [-1.7113e+00, -1.2098e+00,  1.0424e-01,  ..., -2.6068e-01,           -7.1830e-01,  1.0582e+00]]],        [[[ 1.2083e+00,  2.2576e-01,  2.2029e+00,  ...,  1.6064e-01,           -6.7711e-01, -8.1935e-01],          [-1.5649e+00,  1.8701e-01,  6.6335e-01,  ..., -3.2193e-01,            1.7482e+00,  1.2873e+00],          [ 2.4682e-01, -3.3585e-02, -7.3295e-01,  ..., -9.7423e-01,           -5.0875e-01,  1.5034e+00],          ...,          [-1.6163e-04, -3.4227e-02, -2.4157e-01,  ..., -1.0951e+00,            5.8072e-01,  2.5867e-01],          [ 5.9858e-01, -1.4594e+00, -4.2557e-01,  ..., -1.4083e+00,            1.0062e+00, -2.6702e+00],          [ 2.2283e-02,  1.9899e-01, -3.1685e-01,  ..., -9.9946e-01,           -3.1641e-01, -2.1764e+00]],         [[ 2.8564e-01,  4.7435e-01,  1.3970e+00,  ...,  1.4685e-01,            5.1340e-01,  4.2743e-01],          [-1.1349e+00,  1.7398e-01,  8.5008e-02,  ..., -3.1036e-01,            1.3757e+00, -1.1701e+00],          [-5.9442e-01,  3.3539e-01,  1.0349e+00,  ..., -2.2516e+00,            5.1274e-01, -2.2695e-02],          ...,          [ 2.6707e-01, -3.9661e-02,  7.8258e-01,  ...,  1.6181e-02,           -1.0170e+00, -5.4829e-01],          [-6.0622e-01,  1.5736e+00, -7.9128e-01,  ..., -1.1797e-01,           -1.4455e+00,  8.4701e-01],          [-1.5520e+00, -1.6892e+00, -7.7782e-01,  ..., -4.0195e-01,           -4.3646e-01,  2.6970e-01]],         [[ 6.9032e-01,  7.9203e-01,  4.5647e-02,  ...,  6.9158e-01,            8.2187e-01,  2.1916e+00],          [ 8.0458e-01,  1.4788e+00, -1.6513e-01,  ...,  1.0400e+00,            9.9060e-01, -3.3930e-02],          [ 1.4022e-01, -8.6108e-01, -3.1557e-01,  ...,  5.9925e-01,            1.8452e+00,  1.8993e+00],          ...,          [ 9.7114e-01,  2.4893e-01,  8.9429e-01,  ...,  1.3282e+00,           -6.3248e-02,  4.3927e-02],          [-9.2447e-01,  3.5266e-01,  5.7714e-01,  ...,  1.0636e+00,            2.2731e-01, -8.6034e-01],          [-1.1792e+00,  2.3629e-01, -1.5843e+00,  ..., -3.3812e-01,           -1.5923e+00, -5.8710e-01]]]])


def can_file_be_synced_on_current_platform(path):
    """
    Check if the given path can be synced locally.

    Check if it makes sense to sync the file at the given path on the current
    platform.
    For now we don't sync any file in the ~/Library folder on GNU/Linux.
    There might be other exceptions in the future.

    Args:
        (str): Path to the file or folder to check. If relative, prepend it
               with the home folder.
               'abc' becomes '~/abc'
               '/def' stays '/def'

    Returns:
        (bool): True if given file can be synced
    """
    can_be_synced = True

    # If the given path is relative, prepend home
    fullpath = os.path.join(os.environ["HOME"], path)

    # Compute the ~/Library path on macOS
    # End it with a slash because we are looking for this specific folder and
    # not any file/folder named LibrarySomething
    library_path = os.path.join(os.environ["HOME"], "Library/")

    if platform.system() == constants.PLATFORM_LINUX:
        if fullpath.startswith(library_path):
            can_be_synced = False

    return can_be_synced

can_file_be_synced_on_current_platform(path='some/file')


def cli(cls):
    """Decorator that wraps the command line interface
     specific class with fire
    """
    state = DECORATORS_STATE

    def init(self, **cli_args):
        """Generated init"""
        initialize_cli(cli_args, state['schema'])

    cls_attrs = dict(
        __init__=init,
        __repr__=cls.__repr__,
        **{k: v for k, v in cls.__dict__.items() if not k.startswith('_')}
    )

    _Cli = type('Cli', (cls,), cls_attrs)
    state['generated'] = _Cli

    return _Cli

cli(cls=<class 'tests.test_configfile.TestConfigFromWorkingDir.test_configfile.<locals>.Cli'>)

{'__init__': <function cli.<locals>.init at 0x7f29d94174c0>, '__repr__': <slot wrapper '__repr__' of 'object' objects>, 'x': <function TestConfigFromWorkingDir.test_configfile.<locals>.Cli.x at 0x7f29d9417f70>}

{'schema': <tests.test_configfile.TestConfigFromWorkingDir.setUp.<locals>.C object at 0x7f29d98bc640>, 'generated': None}

{'schema': <tests.test_configfile.TestConfigFromWorkingDir.setUp.<locals>.C object at 0x7f29d98bc640>, 'generated': <class 'clima.core.Cli'>}


def generate_k(order, secexp, hash_func, data, retry_gen=0, extra_entropy=b''):
    '''
        order - order of the DSA generator used in the signature
        secexp - secure exponent (private key) in numeric form
        hash_func - reference to the same hash function used for generating hash
        data - hash in binary form of the signing data
        retry_gen - int - how many good 'k' values to skip before returning
        extra_entropy - extra added data in binary form as per section-3.6 of
            rfc6979
    '''

    qlen = bit_length(order)
    holen = hash_func().digest_size
    rolen = (qlen + 7) / 8
    bx = number_to_string(secexp, order) + bits2octets(data, order) + \
        extra_entropy

    # Step B
    v = b'\x01' * holen

    # Step C
    k = b'\x00' * holen

    # Step D

    k = hmac.new(k, v + b'\x00' + bx, hash_func).digest()

    # Step E
    v = hmac.new(k, v, hash_func).digest()

    # Step F
    k = hmac.new(k, v + b'\x01' + bx, hash_func).digest()

    # Step G
    v = hmac.new(k, v, hash_func).digest()

    # Step H
    while True:
        # Step H1
        t = b''

        # Step H2
        while len(t) < rolen:
            v = hmac.new(k, v, hash_func).digest()
            t += v

        # Step H3
        secret = bits2int(t, qlen)

        if secret >= 1 and secret < order:
            if retry_gen <= 0:
                return secret
            else:
                retry_gen -= 1

        k = hmac.new(k, v + b'\x00', hash_func).digest()
        v = hmac.new(k, v, hash_func).digest()

generate_k(order=115792089237316195423570985008687907852837564279074904382605163141518161494337, secexp=11806252235961651298089590628336806290921645495320214372650577192963691649562, hash_func=<built-in function openssl_sha256>, data=b'\xa7?\xcf3\x96@\x92\x92\x07(\x1f\xb8\xe08\x88H\x06\xe2\xeb\x08@\xf2$V\x94\xdb\xba\x1d\\\xc8\x9ee', retry_gen=0, extra_entropy=b'')


def replace_most_similar_chunk(whole, part, replace):
    """Best efforts to find the `part` lines in `whole` and replace them with `replace`"""

    whole, whole_lines = prep(whole)
    part, part_lines = prep(part)
    replace, replace_lines = prep(replace)

    res = perfect_or_whitespace(whole_lines, part_lines, replace_lines)
    if res:
        return res

    # drop leading empty line, GPT sometimes adds them spuriously (issue #25)
    if len(part_lines) > 2 and not part_lines[0].strip():
        skip_blank_line_part_lines = part_lines[1:]
        res = perfect_or_whitespace(whole_lines, skip_blank_line_part_lines, replace_lines)
        if res:
            return res

    # Try to handle when it elides code with ...
    try:
        res = try_dotdotdots(whole, part, replace)
        if res:
            return res
    except ValueError:
        pass

    return
    # Try fuzzy matching
    res = replace_closest_edit_distance(whole_lines, part, part_lines, replace_lines)
    if res:
        return res

replace_most_similar_chunk(whole='two\n', part='two\n', replace='three\n')


def _pntcoord(sol, i, n, m, distances, prec):
    """
    Generate coordinates for point i in constellation to points m and n.

    Check if these coordinates are valid with all other points in the solution.
    """
    tmppnt = []

    state = 1

    pntscount = len(sol)

    # if no distances known, return empty result and the unknown-state
    if distances[i, n] < -0.5 or distances[i, m] < -0.5:
        return tmppnt, state

    # if the Triangle inequality is not fullfilled give a contradiction
    if distances[i, n] + distances[i, m] < _dist(sol[n], sol[m]):
        state = 2
        return tmppnt, state

    # generate the affine rotation to bring the points in the right place
    g = _affinef(*_invtranmat(*_tranmat(sol[n], sol[m])))

    # generate the coordinates
    x = _xvalue(distances[i, n], distances[i, m], _dist(sol[n], sol[m]))
    y1, y2 = _yvalue(distances[i, n], distances[i, m], _dist(sol[n], sol[m]))

    # generate the possible positons
    pos1 = g(np.array([x, y1]))
    pos2 = g(np.array([x, y2]))

    valid1 = True
    valid2 = True

    # check if the possible positions are valid
    for k in range(pntscount):
        if np.ndim(sol[k]) != 0 and distances[i, k] > -0.5:
            valid1 &= abs(_dist(sol[k], pos1) - distances[i, k]) < prec
            valid2 &= abs(_dist(sol[k], pos2) - distances[i, k]) < prec

    # if any position is valid, add it to the result
    if valid1 or valid2:
        state = 0
        same = abs(y1 - y2) < prec / 4.0
        if valid1:
            tmppnt.append(dcopy(pos1))
        if valid2 and not same:
            tmppnt.append(dcopy(pos2))
    # if the positions are not valid, give a contradiction
    else:
        state = 2

    return tmppnt, state

_pntcoord(sol=[array([0., 0.]), array([3., 0.]), 0, 0], i=2, n=0, m=1, distances=array([[ 0.,  3.,  4.,  1.],       [ 3.,  0.,  2.,  3.],       [ 4.,  2.,  0., -1.],       [ 1.,  3., -1.,  0.]]), prec=0.1)

<function _affinef.<locals>.func at 0x7f9d2f5dc9d0>


def load_permissions(apilevel, permtype='permissions'):
    """
    Load the Permissions for the given apilevel.

    The permissions lists are generated using this tool: https://github.com/U039b/aosp_permissions_extraction

    Has a fallback to select the maximum or minimal available API level.
    For example, if 28 is requested but only 26 is available, 26 is returned.
    If 5 is requested but 16 is available, 16 is returned.

    If an API level is requested which is in between of two API levels we got,
    the lower level is returned. For example, if 5,6,7,10 is available and 8 is
    requested, 7 is returned instead.

    :param apilevel:  integer value of the API level
    :param permtype: either load permissions (:code:`'permissions'`) or
    permission groups (:code:`'groups'`)
    :return: a dictionary of {Permission Name: {Permission info}
    """

    if permtype not in ['permissions', 'groups']:
        raise ValueError("The type of permission list is not known.")

    # Usually apilevel is supplied as string...
    apilevel = int(apilevel)

    root = os.path.dirname(os.path.realpath(__file__))
    permissions_file = os.path.join(root, "aosp_permissions", "permissions_{}.json".format(apilevel))

    levels = filter(lambda x: re.match(r'^permissions_\d+\.json$', x), os.listdir(os.path.join(root, "aosp_permissions")))
    levels = list(map(lambda x: int(x[:-5].split('_')[1]), levels))

    if not levels:
        logger.error("No Permissions available, can not load!")
        return {}

    logger.debug("Available API levels: {}".format(", ".join(map(str, sorted(levels)))))

    if not os.path.isfile(permissions_file):
        if apilevel > max(levels):
            logger.warning("Requested API level {} is larger than maximum we have, returning API level {} instead.".format(apilevel, max(levels)))
            return load_permissions(max(levels), permtype)
        if apilevel < min(levels):
            logger.warning("Requested API level {} is smaller than minimal we have, returning API level {} instead.".format(apilevel, max(levels)))
            return load_permissions(min(levels), permtype)

        # Missing level between existing ones, return the lower level
        lower_level = max(filter(lambda x: x < apilevel, levels))
        logger.warning("Requested API Level could not be found, using {} instead".format(lower_level))
        return load_permissions(lower_level, permtype)

    with open(permissions_file, "r") as fp:
        return json.load(fp)[permtype]

load_permissions(apilevel='25', permtype='permissions')


def next_player_move(self, letter_location_set):
        player_to_move_id, player_rack = get_current_player_data(
            self.move_number,
            self.player_rack_list
        )

        is_legal_move = move_is_legal(self.board,
                                      self.move_number,
                                      letter_location_set,
                                      player_rack)

        if is_legal_move:
            if move_successfully_challenged():
                letter_location_set = set()

            for move_letter, board_location in letter_location_set:
                tile_index = get_rack_tile_index(player_rack, move_letter)
                tile_obj = player_rack.pop(tile_index)
                self.board[board_location] = tile_obj

            move_score = score_move(letter_location_set, self.board)
            self.player_score_list_list[player_to_move_id].append(move_score)
            self._refill_player_rack(player_rack)
            self._cancel_bonus_squares(letter_location_set)

            if len(player_rack) == 0 and len(self.tile_bag) == 0:  # Final move
                last_move_score_list = score_end_of_game(self.player_rack_list,
                                                         player_to_move_id)

                for i, last_move_score in enumerate(last_move_score_list):
                    self.player_score_list_list[i].append(last_move_score)

                conclude_game(self.player_score_list_list)

            self.move_number += 1
            return True
        else:
            return False

next_player_move(self=  abcdefghijklmno1 _______________2 _______________3 _______________4 _______________5 _______________6 _______________7 _______________8 _______★_______9 _______________10_______________11_______________12_______________13_______________14_______________15_______________[[Q, E, O, S, G, H, E, B, A, K, E, R], [R, Z, L, A, U, L, A], [W, C, E, T, N, E, E], [T, R, O, B, T, N, N]]Moves played: 0Player 1's move72 tiles remain in bagPlayer 1: 0Player 2: 0Player 3: 0Player 4: 0, letter_location_set={('K', ('j', 8)), ('B', ('h', 8)), ('A', ('i', 8)), ('E', ('k', 8)), ('R', ('l', 8))}, self.board=  abcdefghijklmno1 _______________2 _______________3 _______________4 _______________5 _______________6 _______________7 _______________8 _______★_______9 _______________10_______________11_______________12_______________13_______________14_______________15_______________, self.move_number=0, self.player_rack_list=[[Q, E, O, S, G, H, E, B, A, K, E, R], [R, Z, L, A, U, L, A], [W, C, E, T, N, E, E], [T, R, O, B, T, N, N]], self.player_score_list_list=[[], [], [], []], self.tile_bag=[*, *, A, A, A, A, A, A, A, B, C, D, D, D, D, E, E, E, E, E, E, E, F, F, G, G, H, I, I, I, I, I, I, I, I, I, J, K, L, L, M, M, N, N, N, O, O, O, O, O, O, P, P, R, R, R, R, S, S, S, T, T, T, U, U, U, V, V, W, X, Y, Y])


def perfect_replace(whole_lines, part_lines, replace_lines):
    part_tup = tuple(part_lines)
    part_len = len(part_lines)

    for i in range(len(whole_lines) - part_len + 1):
        whole_tup = tuple(whole_lines[i : i + part_len])
        if part_tup == whole_tup:
            res = whole_lines[:i] + replace_lines + whole_lines[i + part_len :]
            return "".join(res)

perfect_replace(whole_lines=['two\n'], part_lines=['two\n'], replace_lines=['three\n'])


def _unpack_args(args, nargs_spec):
    """Given an iterable of arguments and an iterable of nargs specifications,
    it returns a tuple with all the unpacked arguments at the first index
    and all remaining arguments as the second.

    The nargs specification is the number of arguments that should be consumed
    or `-1` to indicate that this position should eat up all the remainders.

    Missing items are filled with `None`.
    """
    args = deque(args)
    nargs_spec = deque(nargs_spec)
    rv = []
    spos = None

    def _fetch(c):
        try:
            if spos is None:
                return c.popleft()
            else:
                return c.pop()
        except IndexError:
            return None

    while nargs_spec:
        nargs = _fetch(nargs_spec)
        if nargs == 1:
            rv.append(_fetch(args))
        elif nargs > 1:
            x = [_fetch(args) for _ in range(nargs)]
            # If we're reversed, we're pulling in the arguments in reverse,
            # so we need to turn them around.
            if spos is not None:
                x.reverse()
            rv.append(tuple(x))
        elif nargs < 0:
            if spos is not None:
                raise TypeError('Cannot have two nargs < 0')
            spos = len(rv)
            rv.append(None)

    # spos is the position of the wildcard (star).  If it's not `None`,
    # we fill it with the remainder.
    if spos is not None:
        rv[spos] = tuple(args)
        args = []
        rv[spos + 1:] = reversed(rv[spos + 1:])

    return tuple(rv), list(args)

_unpack_args(args=['foo.txt', 'bar.txt', 'dir'], nargs_spec=[-1, 1])

<function _unpack_args.<locals>._fetch at 0x7fe6e9431b80>


def config_dict(configuration_tuple):
    config_dict = {}

    config_file = configuration_tuple._asdict().get('CFG')
    if config_file is None:
        config_file = configfile.get_config_path(configuration_tuple)

    if config_file is not None:
        config_dict = utils.filter_fields(configfile.read_config(config_file), configuration_tuple)
        config_dict = utils.type_correct_with(config_dict, configuration_tuple)

    return config_dict

config_dict(configuration_tuple={})