Project Name: lucidrains+imagen-pytorch
Language: Python
Statement Type: API

Source Code:
def init_conv_(self, conv):
        o, i, h, w = conv.weight.shape
        conv_weight = torch.empty(o // 4, i, h, w)
        nn.init.kaiming_uniform_(conv_weight)
        conv_weight = repeat(conv_weight, 'o ... -> (o 4) ...')

        conv.weight.data.copy_(conv_weight)
        nn.init.zeros_(conv.bias.data)

init_conv_(self=PixelShuffleUpsample(  (net): Sequential(    (0): Conv2d(8, 32, kernel_size=(1, 1), stride=(1, 1))    (1): SiLU()    (2): PixelShuffle(upscale_factor=2)  )), conv=Conv2d(8, 32, kernel_size=(1, 1), stride=(1, 1)), 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([('net', Sequential(  (0): Conv2d(8, 32, kernel_size=(1, 1), stride=(1, 1))  (1): SiLU()  (2): PixelShuffle(upscale_factor=2)))]), self._non_persistent_buffers_set=set(), self._parameters=OrderedDict(), self._state_dict_hooks=OrderedDict(), self._state_dict_pre_hooks=OrderedDict(), self.training=True)

Selected Statement: nn.init.kaiming_uniform_(conv_weight)

Function Input:
self: PixelShuffleUpsample(  (net): Sequential(    (0): Conv2d(8, 32, kernel_size=(1, 1), stride=(1, 1))    (1): SiLU()    (2): PixelShuffle(upscale_factor=2)  ))
conv: Conv2d(8, 32, kernel_size=(1, 1), stride=(1, 1))
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([('net', Sequential(  (0): Conv2d(8, 32, kernel_size=(1, 1), stride=(1, 1))  (1): SiLU()  (2): PixelShuffle(upscale_factor=2)))])
self._non_persistent_buffers_set: set()
self._parameters: OrderedDict()
self._state_dict_hooks: OrderedDict()
self._state_dict_pre_hooks: OrderedDict()
self.training: True

Variable Values Before Statement:
conv_weight: tensor([[[[ 1.4422e+00]],         [[ 1.0425e+00]],         [[-4.1854e-01]],         [[ 6.1111e-02]],         [[ 1.7011e-01]],         [[ 7.3859e-01]],         [[ 1.1234e-01]],         [[ 7.9434e-01]]],        [[[-5.1286e-02]],         [[ 6.4548e-01]],         [[-9.1563e-01]],         [[-1.3698e+00]],         [[-4.4227e-01]],         [[-3.2611e-01]],         [[-1.2114e+00]],         [[ 5.9611e-01]]],        [[[-1.5431e-01]],         [[-1.6676e-01]],         [[ 1.2692e+00]],         [[-2.8656e+00]],         [[ 2.2421e-43]],         [[ 0.0000e+00]],         [[ 3.6013e-43]],         [[ 0.0000e+00]]],        [[[ 2.1569e-07]],         [[ 3.0774e-41]],         [[ 2.1415e-07]],         [[ 3.0774e-41]],         [[ 1.4013e-45]],         [[ 0.0000e+00]],         [[ 1.4013e-45]],         [[ 0.0000e+00]]],        [[[ 1.4013e-45]],         [[ 0.0000e+00]],         [[ 1.4013e-45]],         [[ 0.0000e+00]],         [[ 1.4013e-45]],         [[ 0.0000e+00]],         [[ 1.4013e-45]],         [[ 0.0000e+00]]],        [[[ 1.4013e-45]],         [[ 0.0000e+00]],         [[ 1.4013e-45]],         [[ 0.0000e+00]],         [[ 1.4013e-45]],         [[ 0.0000e+00]],         [[ 1.4013e-45]],         [[ 0.0000e+00]]],        [[[ 1.4013e-45]],         [[ 0.0000e+00]],         [[ 2.0319e-43]],         [[ 0.0000e+00]],         [[ 2.1136e-07]],         [[ 3.0774e-41]],         [[ 2.0801e-07]],         [[ 3.0774e-41]]],        [[[ 4.4842e-44]],         [[ 0.0000e+00]],         [[ 1.5695e-43]],         [[ 0.0000e+00]],         [[ 7.7116e+24]],         [[ 3.0778e-41]],         [[ 0.0000e+00]],         [[ 0.0000e+00]]]])

Value After Statement Execution: tensor([[[[ 0.2046]],         [[ 0.7383]],         [[-0.2354]],         [[ 0.7482]],         [[ 0.3718]],         [[-0.1113]],         [[ 0.5291]],         [[ 0.5602]]],        [[[-0.4435]],         [[-0.5901]],         [[ 0.3579]],         [[-0.2002]],         [[-0.1366]],         [[ 0.8172]],         [[-0.4366]],         [[ 0.8074]]],        [[[ 0.5757]],         [[ 0.6216]],         [[-0.0433]],         [[ 0.6816]],         [[-0.2335]],         [[-0.8362]],         [[-0.6477]],         [[-0.1428]]],        [[[ 0.6086]],         [[-0.8312]],         [[ 0.7359]],         [[ 0.4631]],         [[-0.2967]],         [[-0.5708]],         [[ 0.5318]],         [[-0.2615]]],        [[[ 0.2776]],         [[-0.6416]],         [[-0.1069]],         [[-0.3409]],         [[ 0.6007]],         [[ 0.7782]],         [[-0.4220]],         [[ 0.4654]]],        [[[-0.1207]],         [[-0.6514]],         [[-0.5793]],         [[-0.5897]],         [[-0.5506]],         [[-0.6959]],         [[ 0.8602]],         [[ 0.5812]]],        [[[-0.8445]],         [[ 0.3486]],         [[-0.7968]],         [[ 0.3068]],         [[-0.2670]],         [[ 0.4851]],         [[ 0.8124]],         [[ 0.8039]]],        [[[-0.2703]],         [[-0.2185]],         [[ 0.5634]],         [[ 0.8424]],         [[-0.8168]],         [[-0.2052]],         [[ 0.6885]],         [[ 0.8138]]]])

Variable States During Runtime (line, value):
self: 1
PixelShuffleUpsample(  (net): Sequential(    (0): Conv2d(8, 32, kernel_size=(1, 1), stride=(1, 1))    (1): SiLU()    (2): PixelShuffle(upscale_factor=2)  ))
conv: 1
Conv2d(8, 32, kernel_size=(1, 1), stride=(1, 1))
self._backward_hooks: 1
OrderedDict()
self._backward_pre_hooks: 1
OrderedDict()
self._buffers: 1
OrderedDict()
self._forward_hooks: 1
OrderedDict()
self._forward_hooks_always_called: 1
OrderedDict()
self._forward_hooks_with_kwargs: 1
OrderedDict()
self._forward_pre_hooks: 1
OrderedDict()
self._forward_pre_hooks_with_kwargs: 1
OrderedDict()
self._is_full_backward_hook: 1
None
self._load_state_dict_post_hooks: 1
OrderedDict()
self._load_state_dict_pre_hooks: 1
OrderedDict()
self._modules: 1
OrderedDict([('net', Sequential(  (0): Conv2d(8, 32, kernel_size=(1, 1), stride=(1, 1))  (1): SiLU()  (2): PixelShuffle(upscale_factor=2)))])
self._non_persistent_buffers_set: 1
set()
self._parameters: 1
OrderedDict()
self._state_dict_hooks: 1
OrderedDict()
self._state_dict_pre_hooks: 1
OrderedDict()
self.training: 1
True
o: 2
32
i: 2
8
h: 2
1
w: 2
1
conv_weight: 3
tensor([[[[ 1.4422e+00]],         [[ 1.0425e+00]],         [[-4.1854e-01]],         [[ 6.1111e-02]],         [[ 1.7011e-01]],         [[ 7.3859e-01]],         [[ 1.1234e-01]],         [[ 7.9434e-01]]],        [[[-5.1286e-02]],         [[ 6.4548e-01]],         [[-9.1563e-01]],         [[-1.3698e+00]],         [[-4.4227e-01]],         [[-3.2611e-01]],         [[-1.2114e+00]],         [[ 5.9611e-01]]],        [[[-1.5431e-01]],         [[-1.6676e-01]],         [[ 1.2692e+00]],         [[-2.8656e+00]],         [[ 2.2421e-43]],         [[ 0.0000e+00]],         [[ 3.6013e-43]],         [[ 0.0000e+00]]],        [[[ 2.1569e-07]],         [[ 3.0774e-41]],         [[ 2.1415e-07]],         [[ 3.0774e-41]],         [[ 1.4013e-45]],         [[ 0.0000e+00]],         [[ 1.4013e-45]],         [[ 0.0000e+00]]],        [[[ 1.4013e-45]],         [[ 0.0000e+00]],         [[ 1.4013e-45]],         [[ 0.0000e+00]],         [[ 1.4013e-45]],         [[ 0.0000e+00]],         [[ 1.4013e-45]],         [[ 0.0000e+00]]],        [[[ 1.4013e-45]],         [[ 0.0000e+00]],         [[ 1.4013e-45]],         [[ 0.0000e+00]],         [[ 1.4013e-45]],         [[ 0.0000e+00]],         [[ 1.4013e-45]],         [[ 0.0000e+00]]],        [[[ 1.4013e-45]],         [[ 0.0000e+00]],         [[ 2.0319e-43]],         [[ 0.0000e+00]],         [[ 2.1136e-07]],         [[ 3.0774e-41]],         [[ 2.0801e-07]],         [[ 3.0774e-41]]],        [[[ 4.4842e-44]],         [[ 0.0000e+00]],         [[ 1.5695e-43]],         [[ 0.0000e+00]],         [[ 7.7116e+24]],         [[ 3.0778e-41]],         [[ 0.0000e+00]],         [[ 0.0000e+00]]]])
4
tensor([[[[ 0.2046]],         [[ 0.7383]],         [[-0.2354]],         [[ 0.7482]],         [[ 0.3718]],         [[-0.1113]],         [[ 0.5291]],         [[ 0.5602]]],        [[[-0.4435]],         [[-0.5901]],         [[ 0.3579]],         [[-0.2002]],         [[-0.1366]],         [[ 0.8172]],         [[-0.4366]],         [[ 0.8074]]],        [[[ 0.5757]],         [[ 0.6216]],         [[-0.0433]],         [[ 0.6816]],         [[-0.2335]],         [[-0.8362]],         [[-0.6477]],         [[-0.1428]]],        [[[ 0.6086]],         [[-0.8312]],         [[ 0.7359]],         [[ 0.4631]],         [[-0.2967]],         [[-0.5708]],         [[ 0.5318]],         [[-0.2615]]],        [[[ 0.2776]],         [[-0.6416]],         [[-0.1069]],         [[-0.3409]],         [[ 0.6007]],         [[ 0.7782]],         [[-0.4220]],         [[ 0.4654]]],        [[[-0.1207]],         [[-0.6514]],         [[-0.5793]],         [[-0.5897]],         [[-0.5506]],         [[-0.6959]],         [[ 0.8602]],         [[ 0.5812]]],        [[[-0.8445]],         [[ 0.3486]],         [[-0.7968]],         [[ 0.3068]],         [[-0.2670]],         [[ 0.4851]],         [[ 0.8124]],         [[ 0.8039]]],        [[[-0.2703]],         [[-0.2185]],         [[ 0.5634]],         [[ 0.8424]],         [[-0.8168]],         [[-0.2052]],         [[ 0.6885]],         [[ 0.8138]]]])
5
tensor([[[[ 0.2046]],         [[ 0.7383]],         [[-0.2354]],         [[ 0.7482]],         [[ 0.3718]],         [[-0.1113]],         [[ 0.5291]],         [[ 0.5602]]],        [[[ 0.2046]],         [[ 0.7383]],         [[-0.2354]],         [[ 0.7482]],         [[ 0.3718]],         [[-0.1113]],         [[ 0.5291]],         [[ 0.5602]]],        [[[ 0.2046]],         [[ 0.7383]],         [[-0.2354]],         [[ 0.7482]],         [[ 0.3718]],         [[-0.1113]],         [[ 0.5291]],         [[ 0.5602]]],        [[[ 0.2046]],         [[ 0.7383]],         [[-0.2354]],         [[ 0.7482]],         [[ 0.3718]],         [[-0.1113]],         [[ 0.5291]],         [[ 0.5602]]],        [[[-0.4435]],         [[-0.5901]],         [[ 0.3579]],         [[-0.2002]],         [[-0.1366]],         [[ 0.8172]],         [[-0.4366]],         [[ 0.8074]]],        [[[-0.4435]],         [[-0.5901]],         [[ 0.3579]],         [[-0.2002]],         [[-0.1366]],         [[ 0.8172]],         [[-0.4366]],         [[ 0.8074]]],        [[[-0.4435]],         [[-0.5901]],         [[ 0.3579]],         [[-0.2002]],         [[-0.1366]],         [[ 0.8172]],         [[-0.4366]],         [[ 0.8074]]],        [[[-0.4435]],         [[-0.5901]],         [[ 0.3579]],         [[-0.2002]],         [[-0.1366]],         [[ 0.8172]],         [[-0.4366]],         [[ 0.8074]]],        [[[ 0.5757]],         [[ 0.6216]],         [[-0.0433]],         [[ 0.6816]],         [[-0.2335]],         [[-0.8362]],         [[-0.6477]],         [[-0.1428]]],        [[[ 0.5757]],         [[ 0.6216]],         [[-0.0433]],         [[ 0.6816]],         [[-0.2335]],         [[-0.8362]],         [[-0.6477]],         [[-0.1428]]],        [[[ 0.5757]],         [[ 0.6216]],         [[-0.0433]],         [[ 0.6816]],         [[-0.2335]],         [[-0.8362]],         [[-0.6477]],         [[-0.1428]]],        [[[ 0.5757]],         [[ 0.6216]],         [[-0.0433]],         [[ 0.6816]],         [[-0.2335]],         [[-0.8362]],         [[-0.6477]],         [[-0.1428]]],        [[[ 0.6086]],         [[-0.8312]],         [[ 0.7359]],         [[ 0.4631]],         [[-0.2967]],         [[-0.5708]],         [[ 0.5318]],         [[-0.2615]]],        [[[ 0.6086]],         [[-0.8312]],         [[ 0.7359]],         [[ 0.4631]],         [[-0.2967]],         [[-0.5708]],         [[ 0.5318]],         [[-0.2615]]],        [[[ 0.6086]],         [[-0.8312]],         [[ 0.7359]],         [[ 0.4631]],         [[-0.2967]],         [[-0.5708]],         [[ 0.5318]],         [[-0.2615]]],        [[[ 0.6086]],         [[-0.8312]],         [[ 0.7359]],         [[ 0.4631]],         [[-0.2967]],         [[-0.5708]],         [[ 0.5318]],         [[-0.2615]]],        [[[ 0.2776]],         [[-0.6416]],         [[-0.1069]],         [[-0.3409]],         [[ 0.6007]],         [[ 0.7782]],         [[-0.4220]],         [[ 0.4654]]],        [[[ 0.2776]],         [[-0.6416]],         [[-0.1069]],         [[-0.3409]],         [[ 0.6007]],         [[ 0.7782]],         [[-0.4220]],         [[ 0.4654]]],        [[[ 0.2776]],         [[-0.6416]],         [[-0.1069]],         [[-0.3409]],         [[ 0.6007]],         [[ 0.7782]],         [[-0.4220]],         [[ 0.4654]]],        [[[ 0.2776]],         [[-0.6416]],         [[-0.1069]],         [[-0.3409]],         [[ 0.6007]],         [[ 0.7782]],         [[-0.4220]],         [[ 0.4654]]],        [[[-0.1207]],         [[-0.6514]],         [[-0.5793]],         [[-0.5897]],         [[-0.5506]],         [[-0.6959]],         [[ 0.8602]],         [[ 0.5812]]],        [[[-0.1207]],         [[-0.6514]],         [[-0.5793]],         [[-0.5897]],         [[-0.5506]],         [[-0.6959]],         [[ 0.8602]],         [[ 0.5812]]],        [[[-0.1207]],         [[-0.6514]],         [[-0.5793]],         [[-0.5897]],         [[-0.5506]],         [[-0.6959]],         [[ 0.8602]],         [[ 0.5812]]],        [[[-0.1207]],         [[-0.6514]],         [[-0.5793]],         [[-0.5897]],         [[-0.5506]],         [[-0.6959]],         [[ 0.8602]],         [[ 0.5812]]],        [[[-0.8445]],         [[ 0.3486]],         [[-0.7968]],         [[ 0.3068]],         [[-0.2670]],         [[ 0.4851]],         [[ 0.8124]],         [[ 0.8039]]],        [[[-0.8445]],         [[ 0.3486]],         [[-0.7968]],         [[ 0.3068]],         [[-0.2670]],         [[ 0.4851]],         [[ 0.8124]],         [[ 0.8039]]],        [[[-0.8445]],         [[ 0.3486]],         [[-0.7968]],         [[ 0.3068]],         [[-0.2670]],         [[ 0.4851]],         [[ 0.8124]],         [[ 0.8039]]],        [[[-0.8445]],         [[ 0.3486]],         [[-0.7968]],         [[ 0.3068]],         [[-0.2670]],         [[ 0.4851]],         [[ 0.8124]],         [[ 0.8039]]],        [[[-0.2703]],         [[-0.2185]],         [[ 0.5634]],         [[ 0.8424]],         [[-0.8168]],         [[-0.2052]],         [[ 0.6885]],         [[ 0.8138]]],        [[[-0.2703]],         [[-0.2185]],         [[ 0.5634]],         [[ 0.8424]],         [[-0.8168]],         [[-0.2052]],         [[ 0.6885]],         [[ 0.8138]]],        [[[-0.2703]],         [[-0.2185]],         [[ 0.5634]],         [[ 0.8424]],         [[-0.8168]],         [[-0.2052]],         [[ 0.6885]],         [[ 0.8138]]],        [[[-0.2703]],         [[-0.2185]],         [[ 0.5634]],         [[ 0.8424]],         [[-0.8168]],         [[-0.2052]],         [[ 0.6885]],         [[ 0.8138]]]])