import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
import torch.nn.functional as F
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda
reinterpret_tensor = torch._C._dynamo.guards._reinterpret_tensor


@triton.jit
def triton_poi_fused_rsub_0(in_ptr0, out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    tl.full([XBLOCK], True, tl.int1)
    x0 = xindex
    tmp0 = tl.load(in_ptr0 + x0, None)
    tmp1 = 1.0
    tmp2 = tmp1 - tmp0
    tl.store(out_ptr0 + x0, tmp2, None)


@triton.jit
def triton_poi_fused_leaky_relu_1(in_out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    tl.full([XBLOCK], True, tl.int1)
    x0 = xindex
    tmp0 = tl.load(in_out_ptr0 + x0, None)
    tmp1 = 0.0
    tmp2 = tmp0 > tmp1
    tmp3 = 0.01
    tmp4 = tmp0 * tmp3
    tmp5 = tl.where(tmp2, tmp0, tmp4)
    tl.store(in_out_ptr0 + x0, tmp5, None)


@triton.jit
def triton_poi_fused_add_leaky_relu_2(in_out_ptr0, in_ptr0, xnumel, XBLOCK:
    tl.constexpr):
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    tl.full([XBLOCK], True, tl.int1)
    x0 = xindex
    tmp0 = tl.load(in_out_ptr0 + x0, None)
    tmp1 = tl.load(in_ptr0 + x0, None)
    tmp2 = tmp0 + tmp1
    tmp3 = 0.0
    tmp4 = tmp2 > tmp3
    tmp5 = 0.01
    tmp6 = tmp2 * tmp5
    tmp7 = tl.where(tmp4, tmp2, tmp6)
    tl.store(in_out_ptr0 + x0, tmp7, None)


@triton.jit
def triton_poi_fused_leaky_relu_3(in_out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    tl.full([XBLOCK], True, tl.int1)
    x0 = xindex
    tmp0 = tl.load(in_out_ptr0 + x0, None)
    tmp1 = 0.0
    tmp2 = tmp0 > tmp1
    tmp3 = 0.01
    tmp4 = tmp0 * tmp3
    tmp5 = tl.where(tmp2, tmp0, tmp4)
    tl.store(in_out_ptr0 + x0, tmp5, None)


@triton.jit
def triton_poi_fused_add_leaky_relu_4(in_out_ptr0, in_ptr0, xnumel, XBLOCK:
    tl.constexpr):
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    tl.full([XBLOCK], True, tl.int1)
    x0 = xindex
    tmp0 = tl.load(in_out_ptr0 + x0, None)
    tmp1 = tl.load(in_ptr0 + x0, None)
    tmp2 = tmp0 + tmp1
    tmp3 = 0.0
    tmp4 = tmp2 > tmp3
    tmp5 = 0.01
    tmp6 = tmp2 * tmp5
    tmp7 = tl.where(tmp4, tmp2, tmp6)
    tl.store(in_out_ptr0 + x0, tmp7, None)


@triton.jit
def triton_poi_fused_leaky_relu_5(in_out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    tl.full([XBLOCK], True, tl.int1)
    x0 = xindex
    tmp0 = tl.load(in_out_ptr0 + x0, None)
    tmp1 = 0.0
    tmp2 = tmp0 > tmp1
    tmp3 = 0.01
    tmp4 = tmp0 * tmp3
    tmp5 = tl.where(tmp2, tmp0, tmp4)
    tl.store(in_out_ptr0 + x0, tmp5, None)


@triton.jit
def triton_poi_fused_add_leaky_relu_6(in_out_ptr0, in_ptr0, xnumel, XBLOCK:
    tl.constexpr):
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    tl.full([XBLOCK], True, tl.int1)
    x0 = xindex
    tmp0 = tl.load(in_out_ptr0 + x0, None)
    tmp1 = tl.load(in_ptr0 + x0, None)
    tmp2 = tmp0 + tmp1
    tmp3 = 0.0
    tmp4 = tmp2 > tmp3
    tmp5 = 0.01
    tmp6 = tmp2 * tmp5
    tmp7 = tl.where(tmp4, tmp2, tmp6)
    tl.store(in_out_ptr0 + x0, tmp7, None)


@triton.jit
def triton_poi_fused_leaky_relu_7(in_out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    tl.full([XBLOCK], True, tl.int1)
    x0 = xindex
    tmp0 = tl.load(in_out_ptr0 + x0, None)
    tmp1 = 0.0
    tmp2 = tmp0 > tmp1
    tmp3 = 0.01
    tmp4 = tmp0 * tmp3
    tmp5 = tl.where(tmp2, tmp0, tmp4)
    tl.store(in_out_ptr0 + x0, tmp5, None)


@triton.jit
def triton_poi_fused_add_leaky_relu_8(in_out_ptr0, in_ptr0, xnumel, XBLOCK:
    tl.constexpr):
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    tl.full([XBLOCK], True, tl.int1)
    x0 = xindex
    tmp0 = tl.load(in_out_ptr0 + x0, None)
    tmp1 = tl.load(in_ptr0 + x0, None)
    tmp2 = tmp0 + tmp1
    tmp3 = 0.0
    tmp4 = tmp2 > tmp3
    tmp5 = 0.01
    tmp6 = tmp2 * tmp5
    tmp7 = tl.where(tmp4, tmp2, tmp6)
    tl.store(in_out_ptr0 + x0, tmp7, None)


@triton.jit
def triton_poi_fused_convolution_leaky_relu_9(in_out_ptr0, in_ptr0, xnumel,
    XBLOCK: tl.constexpr):
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    tl.full([XBLOCK], True, tl.int1)
    x3 = xindex
    x1 = xindex // 16 % 64
    tmp0 = tl.load(in_out_ptr0 + x3, None)
    tmp1 = tl.load(in_ptr0 + x1, None, eviction_policy='evict_last')
    tmp2 = tmp0 + tmp1
    tmp3 = 0.0
    tmp4 = tmp2 > tmp3
    tmp5 = 0.01
    tmp6 = tmp2 * tmp5
    tmp7 = tl.where(tmp4, tmp2, tmp6)
    tl.store(in_out_ptr0 + x3, tmp7, None)


@triton.jit
def triton_poi_fused_leaky_relu_10(in_out_ptr0, in_ptr0, xnumel, XBLOCK: tl
    .constexpr):
    xnumel = 256
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x2 = xindex
    x0 = xindex % 64
    tmp0 = tl.load(in_out_ptr0 + x2, xmask)
    tmp1 = tl.load(in_ptr0 + x0, xmask, eviction_policy='evict_last')
    tmp2 = tmp0 + tmp1
    tmp3 = 0.0
    tmp4 = tmp2 > tmp3
    tmp5 = 0.01
    tmp6 = tmp2 * tmp5
    tmp7 = tl.where(tmp4, tmp2, tmp6)
    tl.store(in_out_ptr0 + x2, tmp7, xmask)


@triton.jit
def triton_poi_fused_sigmoid_11(in_out_ptr0, in_ptr0, xnumel, XBLOCK: tl.
    constexpr):
    xnumel = 16
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x2 = xindex
    x0 = xindex % 4
    tmp0 = tl.load(in_out_ptr0 + x2, xmask)
    tmp1 = tl.load(in_ptr0 + x0, xmask, eviction_policy='evict_last')
    tmp2 = tmp0 + tmp1
    tmp3 = tl.sigmoid(tmp2)
    tl.store(in_out_ptr0 + x2, tmp3, xmask)


def call(args):
    (primals_1, primals_2, primals_3, primals_4, primals_5, primals_6,
        primals_7, primals_8, primals_9, primals_10, primals_11, primals_12,
        primals_13, primals_14, primals_15, primals_16, primals_17,
        primals_18, primals_19, primals_20, primals_21, primals_22,
        primals_23, primals_24, primals_25, primals_26, primals_27,
        primals_28, primals_29, primals_30, primals_31, primals_32, primals_33
        ) = args
    args.clear()
    assert_size_stride(primals_1, (4, 1, 128, 128), (16384, 16384, 128, 1))
    assert_size_stride(primals_2, (4, 1, 7, 7), (49, 49, 7, 1))
    assert_size_stride(primals_3, (4, 4, 3, 3), (36, 9, 3, 1))
    assert_size_stride(primals_4, (4, 4, 3, 3), (36, 9, 3, 1))
    assert_size_stride(primals_5, (4, 4, 3, 3), (36, 9, 3, 1))
    assert_size_stride(primals_6, (4, 4, 3, 3), (36, 9, 3, 1))
    assert_size_stride(primals_7, (8, 4, 3, 3), (36, 9, 3, 1))
    assert_size_stride(primals_8, (8, 8, 3, 3), (72, 9, 3, 1))
    assert_size_stride(primals_9, (8, 4, 1, 1), (4, 1, 1, 1))
    assert_size_stride(primals_10, (8, 8, 3, 3), (72, 9, 3, 1))
    assert_size_stride(primals_11, (8, 8, 3, 3), (72, 9, 3, 1))
    assert_size_stride(primals_12, (16, 8, 3, 3), (72, 9, 3, 1))
    assert_size_stride(primals_13, (16, 16, 3, 3), (144, 9, 3, 1))
    assert_size_stride(primals_14, (16, 8, 1, 1), (8, 1, 1, 1))
    assert_size_stride(primals_15, (16, 16, 3, 3), (144, 9, 3, 1))
    assert_size_stride(primals_16, (16, 16, 3, 3), (144, 9, 3, 1))
    assert_size_stride(primals_17, (32, 16, 3, 3), (144, 9, 3, 1))
    assert_size_stride(primals_18, (32, 32, 3, 3), (288, 9, 3, 1))
    assert_size_stride(primals_19, (32, 16, 1, 1), (16, 1, 1, 1))
    assert_size_stride(primals_20, (32, 32, 3, 3), (288, 9, 3, 1))
    assert_size_stride(primals_21, (32, 32, 3, 3), (288, 9, 3, 1))
    assert_size_stride(primals_22, (64, 32, 4, 4), (512, 16, 4, 1))
    assert_size_stride(primals_23, (64,), (1,))
    assert_size_stride(primals_24, (64, 64, 4, 4), (1024, 16, 4, 1))
    assert_size_stride(primals_25, (64,), (1,))
    assert_size_stride(primals_26, (64, 64), (64, 1))
    assert_size_stride(primals_27, (64,), (1,))
    assert_size_stride(primals_28, (64, 64), (64, 1))
    assert_size_stride(primals_29, (64,), (1,))
    assert_size_stride(primals_30, (64, 64), (64, 1))
    assert_size_stride(primals_31, (64,), (1,))
    assert_size_stride(primals_32, (4, 64), (64, 1))
    assert_size_stride(primals_33, (4,), (1,))
    with torch.cuda._DeviceGuard(0):
        torch.cuda.set_device(0)
        buf0 = empty_strided_cuda((4, 1, 128, 128), (16384, 16384, 128, 1),
            torch.float32)
        get_raw_stream(0)
        triton_poi_fused_rsub_0[grid(65536)](primals_1, buf0, 65536, XBLOCK
            =512, num_warps=4, num_stages=1)
        del primals_1
        buf1 = extern_kernels.convolution(buf0, primals_2, stride=(2, 2),
            padding=(3, 3), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf1, (4, 4, 64, 64), (16384, 4096, 64, 1))
        buf2 = buf1
        del buf1
        triton_poi_fused_leaky_relu_1[grid(65536)](buf2, 65536, XBLOCK=256,
            num_warps=4, num_stages=1)
        buf3 = extern_kernels.convolution(buf2, primals_3, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf3, (4, 4, 64, 64), (16384, 4096, 64, 1))
        buf4 = buf3
        del buf3
        triton_poi_fused_leaky_relu_1[grid(65536)](buf4, 65536, XBLOCK=256,
            num_warps=4, num_stages=1)
        buf5 = extern_kernels.convolution(buf4, primals_4, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf5, (4, 4, 64, 64), (16384, 4096, 64, 1))
        buf6 = buf5
        del buf5
        triton_poi_fused_add_leaky_relu_2[grid(65536)](buf6, buf2, 65536,
            XBLOCK=512, num_warps=4, num_stages=1)
        buf7 = extern_kernels.convolution(buf6, primals_5, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf7, (4, 4, 64, 64), (16384, 4096, 64, 1))
        buf8 = buf7
        del buf7
        triton_poi_fused_leaky_relu_1[grid(65536)](buf8, 65536, XBLOCK=256,
            num_warps=4, num_stages=1)
        buf9 = extern_kernels.convolution(buf8, primals_6, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf9, (4, 4, 64, 64), (16384, 4096, 64, 1))
        buf10 = buf9
        del buf9
        triton_poi_fused_add_leaky_relu_2[grid(65536)](buf10, buf6, 65536,
            XBLOCK=512, num_warps=4, num_stages=1)
        buf11 = extern_kernels.convolution(buf10, primals_7, stride=(2, 2),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf11, (4, 8, 32, 32), (8192, 1024, 32, 1))
        buf12 = buf11
        del buf11
        triton_poi_fused_leaky_relu_3[grid(32768)](buf12, 32768, XBLOCK=256,
            num_warps=4, num_stages=1)
        buf13 = extern_kernels.convolution(buf12, primals_8, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf13, (4, 8, 32, 32), (8192, 1024, 32, 1))
        buf14 = extern_kernels.convolution(buf10, primals_9, stride=(2, 2),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf14, (4, 8, 32, 32), (8192, 1024, 32, 1))
        buf15 = buf13
        del buf13
        triton_poi_fused_add_leaky_relu_4[grid(32768)](buf15, buf14, 32768,
            XBLOCK=256, num_warps=4, num_stages=1)
        del buf14
        buf16 = extern_kernels.convolution(buf15, primals_10, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf16, (4, 8, 32, 32), (8192, 1024, 32, 1))
        buf17 = buf16
        del buf16
        triton_poi_fused_leaky_relu_3[grid(32768)](buf17, 32768, XBLOCK=256,
            num_warps=4, num_stages=1)
        buf18 = extern_kernels.convolution(buf17, primals_11, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf18, (4, 8, 32, 32), (8192, 1024, 32, 1))
        buf19 = buf18
        del buf18
        triton_poi_fused_add_leaky_relu_4[grid(32768)](buf19, buf15, 32768,
            XBLOCK=256, num_warps=4, num_stages=1)
        buf20 = extern_kernels.convolution(buf19, primals_12, stride=(2, 2),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf20, (4, 16, 16, 16), (4096, 256, 16, 1))
        buf21 = buf20
        del buf20
        triton_poi_fused_leaky_relu_5[grid(16384)](buf21, 16384, XBLOCK=256,
            num_warps=4, num_stages=1)
        buf22 = extern_kernels.convolution(buf21, primals_13, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf22, (4, 16, 16, 16), (4096, 256, 16, 1))
        buf23 = extern_kernels.convolution(buf19, primals_14, stride=(2, 2),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf23, (4, 16, 16, 16), (4096, 256, 16, 1))
        buf24 = buf22
        del buf22
        triton_poi_fused_add_leaky_relu_6[grid(16384)](buf24, buf23, 16384,
            XBLOCK=256, num_warps=4, num_stages=1)
        del buf23
        buf25 = extern_kernels.convolution(buf24, primals_15, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf25, (4, 16, 16, 16), (4096, 256, 16, 1))
        buf26 = buf25
        del buf25
        triton_poi_fused_leaky_relu_5[grid(16384)](buf26, 16384, XBLOCK=256,
            num_warps=4, num_stages=1)
        buf27 = extern_kernels.convolution(buf26, primals_16, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf27, (4, 16, 16, 16), (4096, 256, 16, 1))
        buf28 = buf27
        del buf27
        triton_poi_fused_add_leaky_relu_6[grid(16384)](buf28, buf24, 16384,
            XBLOCK=256, num_warps=4, num_stages=1)
        buf29 = extern_kernels.convolution(buf28, primals_17, stride=(2, 2),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf29, (4, 32, 8, 8), (2048, 64, 8, 1))
        buf30 = buf29
        del buf29
        triton_poi_fused_leaky_relu_7[grid(8192)](buf30, 8192, XBLOCK=256,
            num_warps=4, num_stages=1)
        buf31 = extern_kernels.convolution(buf30, primals_18, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf31, (4, 32, 8, 8), (2048, 64, 8, 1))
        buf32 = extern_kernels.convolution(buf28, primals_19, stride=(2, 2),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf32, (4, 32, 8, 8), (2048, 64, 8, 1))
        buf33 = buf31
        del buf31
        triton_poi_fused_add_leaky_relu_8[grid(8192)](buf33, buf32, 8192,
            XBLOCK=256, num_warps=4, num_stages=1)
        del buf32
        buf34 = extern_kernels.convolution(buf33, primals_20, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf34, (4, 32, 8, 8), (2048, 64, 8, 1))
        buf35 = buf34
        del buf34
        triton_poi_fused_leaky_relu_7[grid(8192)](buf35, 8192, XBLOCK=256,
            num_warps=4, num_stages=1)
        buf36 = extern_kernels.convolution(buf35, primals_21, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf36, (4, 32, 8, 8), (2048, 64, 8, 1))
        buf37 = buf36
        del buf36
        triton_poi_fused_add_leaky_relu_8[grid(8192)](buf37, buf33, 8192,
            XBLOCK=256, num_warps=4, num_stages=1)
        buf38 = extern_kernels.convolution(buf37, primals_22, stride=(2, 2),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf38, (4, 64, 4, 4), (1024, 16, 4, 1))
        buf39 = buf38
        del buf38
        triton_poi_fused_convolution_leaky_relu_9[grid(4096)](buf39,
            primals_23, 4096, XBLOCK=256, num_warps=4, num_stages=1)
        del primals_23
        buf40 = extern_kernels.convolution(buf39, primals_24, stride=(1, 1),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf40, (4, 64, 1, 1), (64, 1, 1, 1))
        buf41 = reinterpret_tensor(buf40, (4, 64), (64, 1), 0)
        del buf40
        triton_poi_fused_leaky_relu_10[grid(256)](buf41, primals_25, 256,
            XBLOCK=128, num_warps=4, num_stages=1)
        del primals_25
        buf42 = empty_strided_cuda((4, 64), (64, 1), torch.float32)
        extern_kernels.mm(buf41, reinterpret_tensor(primals_26, (64, 64), (
            1, 64), 0), out=buf42)
        buf43 = buf42
        del buf42
        triton_poi_fused_leaky_relu_10[grid(256)](buf43, primals_27, 256,
            XBLOCK=128, num_warps=4, num_stages=1)
        del primals_27
        buf44 = empty_strided_cuda((4, 64), (64, 1), torch.float32)
        extern_kernels.mm(buf43, reinterpret_tensor(primals_28, (64, 64), (
            1, 64), 0), out=buf44)
        buf45 = buf44
        del buf44
        triton_poi_fused_leaky_relu_10[grid(256)](buf45, primals_29, 256,
            XBLOCK=128, num_warps=4, num_stages=1)
        del primals_29
        buf46 = empty_strided_cuda((4, 64), (64, 1), torch.float32)
        extern_kernels.mm(buf45, reinterpret_tensor(primals_30, (64, 64), (
            1, 64), 0), out=buf46)
        buf47 = buf46
        del buf46
        triton_poi_fused_leaky_relu_10[grid(256)](buf47, primals_31, 256,
            XBLOCK=128, num_warps=4, num_stages=1)
        del primals_31
        buf48 = empty_strided_cuda((4, 4), (4, 1), torch.float32)
        extern_kernels.mm(buf47, reinterpret_tensor(primals_32, (64, 4), (1,
            64), 0), out=buf48)
        buf49 = buf48
        del buf48
        triton_poi_fused_sigmoid_11[grid(16)](buf49, primals_33, 16, XBLOCK
            =16, num_warps=1, num_stages=1)
        del primals_33
    return (buf49, primals_2, primals_3, primals_4, primals_5, primals_6,
        primals_7, primals_8, primals_9, primals_10, primals_11, primals_12,
        primals_13, primals_14, primals_15, primals_16, primals_17,
        primals_18, primals_19, primals_20, primals_21, primals_22,
        primals_24, buf0, buf2, buf4, buf6, buf8, buf10, buf12, buf15,
        buf17, buf19, buf21, buf24, buf26, buf28, buf30, buf33, buf35,
        buf37, buf39, buf41, buf43, buf45, buf47, buf49, primals_32,
        primals_30, primals_28, primals_26)


class resnet_block(nn.Module):

    def __init__(self, dim_in, dim_out):
        super(resnet_block, self).__init__()
        self.dim_in = dim_in
        self.dim_out = dim_out
        if self.dim_in == self.dim_out:
            self.conv_1 = nn.Conv2d(self.dim_in, self.dim_out, 3, stride=1,
                padding=1, bias=False)
            self.conv_2 = nn.Conv2d(self.dim_out, self.dim_out, 3, stride=1,
                padding=1, bias=False)
            nn.init.xavier_uniform_(self.conv_1.weight)
            nn.init.xavier_uniform_(self.conv_2.weight)
        else:
            self.conv_1 = nn.Conv2d(self.dim_in, self.dim_out, 3, stride=2,
                padding=1, bias=False)
            self.conv_2 = nn.Conv2d(self.dim_out, self.dim_out, 3, stride=1,
                padding=1, bias=False)
            self.conv_s = nn.Conv2d(self.dim_in, self.dim_out, 1, stride=2,
                padding=0, bias=False)
            nn.init.xavier_uniform_(self.conv_1.weight)
            nn.init.xavier_uniform_(self.conv_2.weight)
            nn.init.xavier_uniform_(self.conv_s.weight)

    def forward(self, input, is_training=False):
        if self.dim_in == self.dim_out:
            output = self.conv_1(input)
            output = F.leaky_relu(output, negative_slope=0.01, inplace=True)
            output = self.conv_2(output)
            output = output + input
            output = F.leaky_relu(output, negative_slope=0.01, inplace=True)
        else:
            output = self.conv_1(input)
            output = F.leaky_relu(output, negative_slope=0.01, inplace=True)
            output = self.conv_2(output)
            input_ = self.conv_s(input)
            output = output + input_
            output = F.leaky_relu(output, negative_slope=0.01, inplace=True)
        return output


class img_encoderNew(nn.Module):

    def __init__(self, img_ef_dim, z_dim):
        super(img_encoderNew, self).__init__()
        self.img_ef_dim = img_ef_dim
        self.z_dim = z_dim
        self.conv_0 = nn.Conv2d(1, self.img_ef_dim, 7, stride=2, padding=3,
            bias=False)
        self.res_1 = resnet_block(self.img_ef_dim, self.img_ef_dim)
        self.res_2 = resnet_block(self.img_ef_dim, self.img_ef_dim)
        self.res_3 = resnet_block(self.img_ef_dim, self.img_ef_dim * 2)
        self.res_4 = resnet_block(self.img_ef_dim * 2, self.img_ef_dim * 2)
        self.res_5 = resnet_block(self.img_ef_dim * 2, self.img_ef_dim * 4)
        self.res_6 = resnet_block(self.img_ef_dim * 4, self.img_ef_dim * 4)
        self.res_7 = resnet_block(self.img_ef_dim * 4, self.img_ef_dim * 8)
        self.res_8 = resnet_block(self.img_ef_dim * 8, self.img_ef_dim * 8)
        self.conv_9 = nn.Conv2d(self.img_ef_dim * 8, self.img_ef_dim * 16, 
            4, stride=2, padding=1, bias=True)
        self.conv_10 = nn.Conv2d(self.img_ef_dim * 16, self.img_ef_dim * 16,
            4, stride=1, padding=0, bias=True)
        self.linear_1 = nn.Linear(self.img_ef_dim * 16, self.img_ef_dim * 
            16, bias=True)
        self.linear_2 = nn.Linear(self.img_ef_dim * 16, self.img_ef_dim * 
            16, bias=True)
        self.linear_3 = nn.Linear(self.img_ef_dim * 16, self.img_ef_dim * 
            16, bias=True)
        self.linear_4 = nn.Linear(self.img_ef_dim * 16, self.z_dim, bias=True)
        nn.init.xavier_uniform_(self.conv_0.weight)
        nn.init.xavier_uniform_(self.conv_9.weight)
        nn.init.constant_(self.conv_9.bias, 0)
        nn.init.xavier_uniform_(self.conv_10.weight)
        nn.init.constant_(self.conv_10.bias, 0)
        nn.init.xavier_uniform_(self.linear_1.weight)
        nn.init.constant_(self.linear_1.bias, 0)
        nn.init.xavier_uniform_(self.linear_2.weight)
        nn.init.constant_(self.linear_2.bias, 0)
        nn.init.xavier_uniform_(self.linear_3.weight)
        nn.init.constant_(self.linear_3.bias, 0)
        nn.init.xavier_uniform_(self.linear_4.weight)
        nn.init.constant_(self.linear_4.bias, 0)

    def forward(self, input_0):
        primals_2 = self.conv_0.weight
        primals_3 = self.res_1.conv_1.weight
        primals_4 = self.res_1.conv_2.weight
        primals_5 = self.res_2.conv_1.weight
        primals_6 = self.res_2.conv_2.weight
        primals_7 = self.res_3.conv_1.weight
        primals_8 = self.res_3.conv_2.weight
        primals_9 = self.res_3.conv_s.weight
        primals_10 = self.res_4.conv_1.weight
        primals_11 = self.res_4.conv_2.weight
        primals_12 = self.res_5.conv_1.weight
        primals_13 = self.res_5.conv_2.weight
        primals_14 = self.res_5.conv_s.weight
        primals_15 = self.res_6.conv_1.weight
        primals_16 = self.res_6.conv_2.weight
        primals_17 = self.res_7.conv_1.weight
        primals_18 = self.res_7.conv_2.weight
        primals_19 = self.res_7.conv_s.weight
        primals_20 = self.res_8.conv_1.weight
        primals_21 = self.res_8.conv_2.weight
        primals_22 = self.conv_9.weight
        primals_23 = self.conv_9.bias
        primals_24 = self.conv_10.weight
        primals_25 = self.conv_10.bias
        primals_26 = self.linear_1.weight
        primals_27 = self.linear_1.bias
        primals_28 = self.linear_2.weight
        primals_29 = self.linear_2.bias
        primals_30 = self.linear_3.weight
        primals_31 = self.linear_3.bias
        primals_32 = self.linear_4.weight
        primals_33 = self.linear_4.bias
        primals_1 = input_0
        output = call([primals_1, primals_2, primals_3, primals_4,
            primals_5, primals_6, primals_7, primals_8, primals_9,
            primals_10, primals_11, primals_12, primals_13, primals_14,
            primals_15, primals_16, primals_17, primals_18, primals_19,
            primals_20, primals_21, primals_22, primals_23, primals_24,
            primals_25, primals_26, primals_27, primals_28, primals_29,
            primals_30, primals_31, primals_32, primals_33])
        return output[0]


Measured latency_ms: 0.041272