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
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import math as tl_math
from torch import nn
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_reflection_pad2d_0(in_ptr0, out_ptr0, xnumel, XBLOCK:
    tl.constexpr):
    xnumel = 17424
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 66
    x1 = xindex // 66 % 66
    x2 = xindex // 4356
    x3 = xindex
    tmp0 = tl.load(in_ptr0 + (4095 + -1 * tl_math.abs(-63 + tl_math.abs(-1 +
        x0)) + -64 * tl_math.abs(-63 + tl_math.abs(-1 + x1)) + 4096 * x2),
        xmask, eviction_policy='evict_last')
    tl.store(out_ptr0 + x3, tmp0, xmask)


@triton.jit
def triton_poi_fused_convolution_leaky_relu_reflection_pad2d_1(in_ptr0,
    in_ptr1, out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 139392
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 66
    x1 = xindex // 66 % 66
    x4 = xindex // 4356
    x2 = xindex // 4356 % 8
    x5 = xindex
    tmp0 = tl.load(in_ptr0 + (4095 + -1 * tl_math.abs(-63 + tl_math.abs(-1 +
        x0)) + -64 * tl_math.abs(-63 + tl_math.abs(-1 + x1)) + 4096 * x4),
        xmask, eviction_policy='evict_last')
    tmp1 = tl.load(in_ptr1 + x2, 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(out_ptr0 + x5, tmp7, xmask)


@triton.jit
def triton_poi_fused_add_convolution_leaky_relu_2(in_out_ptr0, in_ptr0,
    in_ptr1, xnumel, XBLOCK: tl.constexpr):
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    tl.full([XBLOCK], True, tl.int1)
    x1 = xindex // 4096 % 8
    x3 = xindex
    x0 = xindex % 4096
    x2 = xindex // 32768
    tmp21 = tl.load(in_out_ptr0 + x3, None)
    tmp22 = tl.load(in_ptr0 + x1, None, eviction_policy='evict_last')
    tmp0 = x1
    tmp1 = tl.full([1], 1, tl.int64)
    tmp2 = tmp0 < tmp1
    tmp3 = tmp2 & tmp2
    tmp4 = tl.load(in_out_ptr0 + x3, tmp3, other=0.0)
    tmp5 = tl.load(in_ptr0 + x1, tmp3, eviction_policy='evict_last', other=0.0)
    tmp6 = tmp4 + tmp5
    tmp7 = tl.load(in_ptr1 + (x0 + 4096 * x2), tmp3, eviction_policy=
        'evict_last', other=0.0)
    tmp8 = tmp6 + tmp7
    tmp9 = tl.full(tmp8.shape, 0.0, tmp8.dtype)
    tmp10 = tl.where(tmp3, tmp8, tmp9)
    tmp11 = tl.load(in_out_ptr0 + x3, tmp2, other=0.0)
    tmp12 = tl.load(in_ptr0 + x1, tmp2, eviction_policy='evict_last', other=0.0
        )
    tmp13 = tmp11 + tmp12
    tmp14 = tl.where(tmp2, tmp10, tmp13)
    tmp15 = tl.full(tmp14.shape, 0.0, tmp14.dtype)
    tmp16 = tl.where(tmp2, tmp14, tmp15)
    tmp17 = tl.load(in_ptr1 + (x0 + 4096 * x2), tmp2, eviction_policy=
        'evict_last', other=0.0)
    tmp18 = tmp13 + tmp17
    tmp19 = tl.full(tmp18.shape, 0.0, tmp18.dtype)
    tmp20 = tl.where(tmp2, tmp18, tmp19)
    tmp23 = tmp21 + tmp22
    tmp24 = tl.where(tmp2, tmp20, tmp23)
    tmp25 = tl.where(tmp2, tmp16, tmp24)
    tmp26 = 0.0
    tmp27 = tmp25 > tmp26
    tmp28 = 0.01
    tmp29 = tmp25 * tmp28
    tmp30 = tl.where(tmp27, tmp25, tmp29)
    tl.store(in_out_ptr0 + x3, tmp30, None)


@triton.jit
def triton_poi_fused_avg_pool2d_reflection_pad2d_3(in_ptr0, out_ptr0,
    xnumel, XBLOCK: tl.constexpr):
    xnumel = 36992
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 34
    x1 = xindex // 34 % 34
    x2 = xindex // 1156
    x3 = xindex
    tmp0 = tl.load(in_ptr0 + (4030 + -128 * tl_math.abs(-31 + tl_math.abs(-
        1 + x1)) + -2 * tl_math.abs(-31 + tl_math.abs(-1 + x0)) + 4096 * x2
        ), xmask, eviction_policy='evict_last')
    tmp1 = tl.load(in_ptr0 + (4031 + -128 * tl_math.abs(-31 + tl_math.abs(-
        1 + x1)) + -2 * tl_math.abs(-31 + tl_math.abs(-1 + x0)) + 4096 * x2
        ), xmask, eviction_policy='evict_last')
    tmp3 = tl.load(in_ptr0 + (4094 + -128 * tl_math.abs(-31 + tl_math.abs(-
        1 + x1)) + -2 * tl_math.abs(-31 + tl_math.abs(-1 + x0)) + 4096 * x2
        ), xmask, eviction_policy='evict_last')
    tmp5 = tl.load(in_ptr0 + (4095 + -128 * tl_math.abs(-31 + tl_math.abs(-
        1 + x1)) + -2 * tl_math.abs(-31 + tl_math.abs(-1 + x0)) + 4096 * x2
        ), xmask, eviction_policy='evict_last')
    tmp2 = tmp1 + tmp0
    tmp4 = tmp3 + tmp2
    tmp6 = tmp5 + tmp4
    tmp7 = 0.25
    tmp8 = tmp6 * tmp7
    tl.store(out_ptr0 + x3, tmp8, xmask)


@triton.jit
def triton_poi_fused_convolution_leaky_relu_reflection_pad2d_4(in_ptr0,
    in_ptr1, out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 73984
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 34
    x1 = xindex // 34 % 34
    x4 = xindex // 1156
    x2 = xindex // 1156 % 16
    x5 = xindex
    tmp0 = tl.load(in_ptr0 + (1023 + -1 * tl_math.abs(-31 + tl_math.abs(-1 +
        x0)) + -32 * tl_math.abs(-31 + tl_math.abs(-1 + x1)) + 1024 * x4),
        xmask, eviction_policy='evict_last')
    tmp1 = tl.load(in_ptr1 + x2, 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(out_ptr0 + x5, tmp7, xmask)


@triton.jit
def triton_poi_fused_add_avg_pool2d_convolution_leaky_relu_5(in_out_ptr0,
    in_ptr0, in_ptr1, xnumel, XBLOCK: tl.constexpr):
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    tl.full([XBLOCK], True, tl.int1)
    x2 = xindex // 1024 % 16
    x5 = xindex
    x0 = xindex % 32
    x3 = xindex // 16384
    x6 = xindex // 32 % 512
    tmp18 = tl.load(in_out_ptr0 + x5, None)
    tmp19 = tl.load(in_ptr0 + x2, None, eviction_policy='evict_last')
    tmp0 = x2
    tmp1 = tl.full([1], 8, tl.int64)
    tmp2 = tmp0 < tmp1
    tmp3 = tl.load(in_out_ptr0 + x5, tmp2, other=0.0)
    tmp4 = tl.load(in_ptr0 + x2, tmp2, eviction_policy='evict_last', other=0.0)
    tmp5 = tmp3 + tmp4
    tmp6 = tl.load(in_ptr1 + (2 * x0 + 128 * x6 + 32768 * x3), tmp2,
        eviction_policy='evict_last', other=0.0)
    tmp7 = tl.load(in_ptr1 + (1 + 2 * x0 + 128 * x6 + 32768 * x3), tmp2,
        eviction_policy='evict_last', other=0.0)
    tmp8 = tmp7 + tmp6
    tmp9 = tl.load(in_ptr1 + (64 + 2 * x0 + 128 * x6 + 32768 * x3), tmp2,
        eviction_policy='evict_last', other=0.0)
    tmp10 = tmp9 + tmp8
    tmp11 = tl.load(in_ptr1 + (65 + 2 * x0 + 128 * x6 + 32768 * x3), tmp2,
        eviction_policy='evict_last', other=0.0)
    tmp12 = tmp11 + tmp10
    tmp13 = 0.25
    tmp14 = tmp12 * tmp13
    tmp15 = tmp5 + tmp14
    tmp16 = tl.full(tmp15.shape, 0.0, tmp15.dtype)
    tmp17 = tl.where(tmp2, tmp15, tmp16)
    tmp20 = tmp18 + tmp19
    tmp21 = tl.where(tmp2, tmp17, tmp20)
    tmp22 = tl.where(tmp2, tmp21, tmp21)
    tmp23 = 0.0
    tmp24 = tmp22 > tmp23
    tmp25 = 0.01
    tmp26 = tmp22 * tmp25
    tmp27 = tl.where(tmp24, tmp22, tmp26)
    tl.store(in_out_ptr0 + x5, tmp27, None)


@triton.jit
def triton_poi_fused_avg_pool2d_reflection_pad2d_6(in_ptr0, out_ptr0,
    xnumel, XBLOCK: tl.constexpr):
    xnumel = 20736
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 18
    x1 = xindex // 18 % 18
    x2 = xindex // 324
    x3 = xindex
    tmp0 = tl.load(in_ptr0 + (990 + -64 * tl_math.abs(-15 + tl_math.abs(-1 +
        x1)) + -2 * tl_math.abs(-15 + tl_math.abs(-1 + x0)) + 1024 * x2),
        xmask, eviction_policy='evict_last')
    tmp1 = tl.load(in_ptr0 + (991 + -64 * tl_math.abs(-15 + tl_math.abs(-1 +
        x1)) + -2 * tl_math.abs(-15 + tl_math.abs(-1 + x0)) + 1024 * x2),
        xmask, eviction_policy='evict_last')
    tmp3 = tl.load(in_ptr0 + (1022 + -64 * tl_math.abs(-15 + tl_math.abs(-1 +
        x1)) + -2 * tl_math.abs(-15 + tl_math.abs(-1 + x0)) + 1024 * x2),
        xmask, eviction_policy='evict_last')
    tmp5 = tl.load(in_ptr0 + (1023 + -64 * tl_math.abs(-15 + tl_math.abs(-1 +
        x1)) + -2 * tl_math.abs(-15 + tl_math.abs(-1 + x0)) + 1024 * x2),
        xmask, eviction_policy='evict_last')
    tmp2 = tmp1 + tmp0
    tmp4 = tmp3 + tmp2
    tmp6 = tmp5 + tmp4
    tmp7 = 0.25
    tmp8 = tmp6 * tmp7
    tl.store(out_ptr0 + x3, tmp8, xmask)


@triton.jit
def triton_poi_fused_convolution_leaky_relu_reflection_pad2d_7(in_ptr0,
    in_ptr1, out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 41472
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 18
    x1 = xindex // 18 % 18
    x4 = xindex // 324
    x2 = xindex // 324 % 32
    x5 = xindex
    tmp0 = tl.load(in_ptr0 + (255 + -1 * tl_math.abs(-15 + tl_math.abs(-1 +
        x0)) + -16 * tl_math.abs(-15 + tl_math.abs(-1 + x1)) + 256 * x4),
        xmask, eviction_policy='evict_last')
    tmp1 = tl.load(in_ptr1 + x2, 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(out_ptr0 + x5, tmp7, xmask)


@triton.jit
def triton_poi_fused_add_avg_pool2d_convolution_leaky_relu_8(in_out_ptr0,
    in_ptr0, in_ptr1, xnumel, XBLOCK: tl.constexpr):
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    tl.full([XBLOCK], True, tl.int1)
    x2 = xindex // 256 % 32
    x5 = xindex
    x0 = xindex % 16
    x3 = xindex // 8192
    x6 = xindex // 16 % 512
    tmp18 = tl.load(in_out_ptr0 + x5, None)
    tmp19 = tl.load(in_ptr0 + x2, None, eviction_policy='evict_last')
    tmp0 = x2
    tmp1 = tl.full([1], 16, tl.int64)
    tmp2 = tmp0 < tmp1
    tmp3 = tl.load(in_out_ptr0 + x5, tmp2, other=0.0)
    tmp4 = tl.load(in_ptr0 + x2, tmp2, eviction_policy='evict_last', other=0.0)
    tmp5 = tmp3 + tmp4
    tmp6 = tl.load(in_ptr1 + (2 * x0 + 64 * x6 + 16384 * x3), tmp2,
        eviction_policy='evict_last', other=0.0)
    tmp7 = tl.load(in_ptr1 + (1 + 2 * x0 + 64 * x6 + 16384 * x3), tmp2,
        eviction_policy='evict_last', other=0.0)
    tmp8 = tmp7 + tmp6
    tmp9 = tl.load(in_ptr1 + (32 + 2 * x0 + 64 * x6 + 16384 * x3), tmp2,
        eviction_policy='evict_last', other=0.0)
    tmp10 = tmp9 + tmp8
    tmp11 = tl.load(in_ptr1 + (33 + 2 * x0 + 64 * x6 + 16384 * x3), tmp2,
        eviction_policy='evict_last', other=0.0)
    tmp12 = tmp11 + tmp10
    tmp13 = 0.25
    tmp14 = tmp12 * tmp13
    tmp15 = tmp5 + tmp14
    tmp16 = tl.full(tmp15.shape, 0.0, tmp15.dtype)
    tmp17 = tl.where(tmp2, tmp15, tmp16)
    tmp20 = tmp18 + tmp19
    tmp21 = tl.where(tmp2, tmp17, tmp20)
    tmp22 = tl.where(tmp2, tmp21, tmp21)
    tmp23 = 0.0
    tmp24 = tmp22 > tmp23
    tmp25 = 0.01
    tmp26 = tmp22 * tmp25
    tmp27 = tl.where(tmp24, tmp22, tmp26)
    tl.store(in_out_ptr0 + x5, tmp27, None)


@triton.jit
def triton_poi_fused_avg_pool2d_reflection_pad2d_9(in_ptr0, out_ptr0,
    xnumel, XBLOCK: tl.constexpr):
    xnumel = 12800
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 10
    x1 = xindex // 10 % 10
    x2 = xindex // 100
    x3 = xindex
    tmp0 = tl.load(in_ptr0 + (238 + -32 * tl_math.abs(-7 + tl_math.abs(-1 +
        x1)) + -2 * tl_math.abs(-7 + tl_math.abs(-1 + x0)) + 256 * x2),
        xmask, eviction_policy='evict_last')
    tmp1 = tl.load(in_ptr0 + (239 + -32 * tl_math.abs(-7 + tl_math.abs(-1 +
        x1)) + -2 * tl_math.abs(-7 + tl_math.abs(-1 + x0)) + 256 * x2),
        xmask, eviction_policy='evict_last')
    tmp3 = tl.load(in_ptr0 + (254 + -32 * tl_math.abs(-7 + tl_math.abs(-1 +
        x1)) + -2 * tl_math.abs(-7 + tl_math.abs(-1 + x0)) + 256 * x2),
        xmask, eviction_policy='evict_last')
    tmp5 = tl.load(in_ptr0 + (255 + -32 * tl_math.abs(-7 + tl_math.abs(-1 +
        x1)) + -2 * tl_math.abs(-7 + tl_math.abs(-1 + x0)) + 256 * x2),
        xmask, eviction_policy='evict_last')
    tmp2 = tmp1 + tmp0
    tmp4 = tmp3 + tmp2
    tmp6 = tmp5 + tmp4
    tmp7 = 0.25
    tmp8 = tmp6 * tmp7
    tl.store(out_ptr0 + x3, tmp8, xmask)


@triton.jit
def triton_poi_fused_convolution_leaky_relu_reflection_pad2d_10(in_ptr0,
    in_ptr1, out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 25600
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 10
    x1 = xindex // 10 % 10
    x4 = xindex // 100
    x2 = xindex // 100 % 64
    x5 = xindex
    tmp0 = tl.load(in_ptr0 + (63 + -1 * tl_math.abs(-7 + tl_math.abs(-1 +
        x0)) + -8 * tl_math.abs(-7 + tl_math.abs(-1 + x1)) + 64 * x4),
        xmask, eviction_policy='evict_last')
    tmp1 = tl.load(in_ptr1 + x2, 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(out_ptr0 + x5, tmp7, xmask)


@triton.jit
def triton_poi_fused_add_avg_pool2d_convolution_leaky_relu_11(in_out_ptr0,
    in_ptr0, in_ptr1, xnumel, XBLOCK: tl.constexpr):
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    tl.full([XBLOCK], True, tl.int1)
    x2 = xindex // 64 % 64
    x5 = xindex
    x0 = xindex % 8
    x3 = xindex // 4096
    x6 = xindex // 8 % 512
    tmp18 = tl.load(in_out_ptr0 + x5, None)
    tmp19 = tl.load(in_ptr0 + x2, None, eviction_policy='evict_last')
    tmp0 = x2
    tmp1 = tl.full([1], 32, tl.int64)
    tmp2 = tmp0 < tmp1
    tmp3 = tl.load(in_out_ptr0 + x5, tmp2, other=0.0)
    tmp4 = tl.load(in_ptr0 + x2, tmp2, eviction_policy='evict_last', other=0.0)
    tmp5 = tmp3 + tmp4
    tmp6 = tl.load(in_ptr1 + (2 * x0 + 32 * x6 + 8192 * x3), tmp2,
        eviction_policy='evict_last', other=0.0)
    tmp7 = tl.load(in_ptr1 + (1 + 2 * x0 + 32 * x6 + 8192 * x3), tmp2,
        eviction_policy='evict_last', other=0.0)
    tmp8 = tmp7 + tmp6
    tmp9 = tl.load(in_ptr1 + (16 + 2 * x0 + 32 * x6 + 8192 * x3), tmp2,
        eviction_policy='evict_last', other=0.0)
    tmp10 = tmp9 + tmp8
    tmp11 = tl.load(in_ptr1 + (17 + 2 * x0 + 32 * x6 + 8192 * x3), tmp2,
        eviction_policy='evict_last', other=0.0)
    tmp12 = tmp11 + tmp10
    tmp13 = 0.25
    tmp14 = tmp12 * tmp13
    tmp15 = tmp5 + tmp14
    tmp16 = tl.full(tmp15.shape, 0.0, tmp15.dtype)
    tmp17 = tl.where(tmp2, tmp15, tmp16)
    tmp20 = tmp18 + tmp19
    tmp21 = tl.where(tmp2, tmp17, tmp20)
    tmp22 = tl.where(tmp2, tmp21, tmp21)
    tmp23 = 0.0
    tmp24 = tmp22 > tmp23
    tmp25 = 0.01
    tmp26 = tmp22 * tmp25
    tmp27 = tl.where(tmp24, tmp22, tmp26)
    tl.store(in_out_ptr0 + x5, tmp27, None)


@triton.jit
def triton_poi_fused_avg_pool2d_reflection_pad2d_12(in_ptr0, out_ptr0,
    xnumel, XBLOCK: tl.constexpr):
    xnumel = 9216
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 6
    x1 = xindex // 6 % 6
    x2 = xindex // 36
    x3 = xindex
    tmp0 = tl.load(in_ptr0 + (54 + -16 * tl_math.abs(-3 + tl_math.abs(-1 +
        x1)) + -2 * tl_math.abs(-3 + tl_math.abs(-1 + x0)) + 64 * x2),
        xmask, eviction_policy='evict_last')
    tmp1 = tl.load(in_ptr0 + (55 + -16 * tl_math.abs(-3 + tl_math.abs(-1 +
        x1)) + -2 * tl_math.abs(-3 + tl_math.abs(-1 + x0)) + 64 * x2),
        xmask, eviction_policy='evict_last')
    tmp3 = tl.load(in_ptr0 + (62 + -16 * tl_math.abs(-3 + tl_math.abs(-1 +
        x1)) + -2 * tl_math.abs(-3 + tl_math.abs(-1 + x0)) + 64 * x2),
        xmask, eviction_policy='evict_last')
    tmp5 = tl.load(in_ptr0 + (63 + -16 * tl_math.abs(-3 + tl_math.abs(-1 +
        x1)) + -2 * tl_math.abs(-3 + tl_math.abs(-1 + x0)) + 64 * x2),
        xmask, eviction_policy='evict_last')
    tmp2 = tmp1 + tmp0
    tmp4 = tmp3 + tmp2
    tmp6 = tmp5 + tmp4
    tmp7 = 0.25
    tmp8 = tmp6 * tmp7
    tl.store(out_ptr0 + x3, tmp8, xmask)


@triton.jit
def triton_poi_fused_convolution_leaky_relu_reflection_pad2d_13(in_ptr0,
    in_ptr1, out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 9216
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 6
    x1 = xindex // 6 % 6
    x4 = xindex // 36
    x2 = xindex // 36 % 64
    x5 = xindex
    tmp0 = tl.load(in_ptr0 + (15 + -1 * tl_math.abs(-3 + tl_math.abs(-1 +
        x0)) + -4 * tl_math.abs(-3 + tl_math.abs(-1 + x1)) + 16 * x4),
        xmask, eviction_policy='evict_last')
    tmp1 = tl.load(in_ptr1 + x2, 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(out_ptr0 + x5, tmp7, xmask)


@triton.jit
def triton_poi_fused_add_avg_pool2d_convolution_leaky_relu_leaky_relu_backward_14(
    in_out_ptr0, in_ptr0, in_ptr1, out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    tl.full([XBLOCK], True, tl.int1)
    x4 = xindex
    x2 = xindex // 16 % 64
    x0 = xindex % 4
    x5 = xindex // 4
    tmp0 = tl.load(in_out_ptr0 + x4, None)
    tmp1 = tl.load(in_ptr0 + x2, None, eviction_policy='evict_last')
    tmp3 = tl.load(in_ptr1 + (2 * x0 + 16 * x5), None, eviction_policy=
        'evict_last')
    tmp4 = tl.load(in_ptr1 + (1 + 2 * x0 + 16 * x5), None, eviction_policy=
        'evict_last')
    tmp6 = tl.load(in_ptr1 + (8 + 2 * x0 + 16 * x5), None, eviction_policy=
        'evict_last')
    tmp8 = tl.load(in_ptr1 + (9 + 2 * x0 + 16 * x5), None, eviction_policy=
        'evict_last')
    tmp2 = tmp0 + tmp1
    tmp5 = tmp4 + tmp3
    tmp7 = tmp6 + tmp5
    tmp9 = tmp8 + tmp7
    tmp10 = 0.25
    tmp11 = tmp9 * tmp10
    tmp12 = tmp2 + tmp11
    tmp13 = 0.0
    tmp14 = tmp12 > tmp13
    tmp15 = 0.01
    tmp16 = tmp12 * tmp15
    tmp17 = tl.where(tmp14, tmp12, tmp16)
    tmp18 = tmp17 > tmp13
    tl.store(in_out_ptr0 + x4, tmp12, None)
    tl.store(out_ptr0 + x4, tmp18, None)


@triton.jit
def triton_poi_fused_arange_15(out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 8
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex
    tmp0 = x0
    tl.store(out_ptr0 + x0, tmp0, xmask)


@triton.jit
def triton_poi_fused__to_copy_16(out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 8
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex
    tmp0 = x0
    tmp1 = tmp0.to(tl.float32)
    tmp2 = 0.5
    tmp3 = tmp1 + tmp2
    tmp4 = tmp3 * tmp2
    tmp5 = tmp4 - tmp2
    tmp6 = 0.0
    tmp7 = triton_helpers.maximum(tmp5, tmp6)
    tmp8 = tmp7.to(tl.int32)
    tl.store(out_ptr0 + x0, tmp8, xmask)


@triton.jit
def triton_poi_fused_add_clamp_17(out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 8
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex
    tmp0 = x0
    tmp1 = tmp0.to(tl.float32)
    tmp2 = 0.5
    tmp3 = tmp1 + tmp2
    tmp4 = tmp3 * tmp2
    tmp5 = tmp4 - tmp2
    tmp6 = 0.0
    tmp7 = triton_helpers.maximum(tmp5, tmp6)
    tmp8 = tmp7.to(tl.int32)
    tmp9 = tl.full([1], 1, tl.int64)
    tmp10 = tmp8 + tmp9
    tmp11 = tl.full([1], 3, tl.int64)
    tmp12 = triton_helpers.minimum(tmp10, tmp11)
    tl.store(out_ptr0 + x0, tmp12, xmask)


@triton.jit
def triton_poi_fused__to_copy_add_clamp_mul_sub_18(out_ptr0, xnumel, XBLOCK:
    tl.constexpr):
    xnumel = 8
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex
    tmp0 = x0
    tmp1 = tmp0.to(tl.float32)
    tmp2 = 0.5
    tmp3 = tmp1 + tmp2
    tmp4 = tmp3 * tmp2
    tmp5 = tmp4 - tmp2
    tmp6 = 0.0
    tmp7 = triton_helpers.maximum(tmp5, tmp6)
    tmp8 = tmp7.to(tl.int32)
    tmp9 = tmp8.to(tl.float32)
    tmp10 = tmp7 - tmp9
    tmp11 = triton_helpers.maximum(tmp10, tmp6)
    tmp12 = 1.0
    tmp13 = triton_helpers.minimum(tmp11, tmp12)
    tl.store(out_ptr0 + x0, tmp13, xmask)


@triton.jit
def triton_poi_fused__unsafe_index_add_leaky_relu_mul_sub_19(in_ptr0,
    in_ptr1, in_ptr2, in_ptr3, in_ptr4, out_ptr0, xnumel, XBLOCK: tl.constexpr
    ):
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    tl.full([XBLOCK], True, tl.int1)
    x1 = xindex // 8 % 8
    x0 = xindex % 8
    x2 = xindex // 64
    x4 = xindex
    tmp0 = tl.load(in_ptr0 + x1, None, eviction_policy='evict_last')
    tmp5 = tl.load(in_ptr1 + x0, None, eviction_policy='evict_last')
    tmp15 = tl.load(in_ptr3 + x0, None, eviction_policy='evict_last')
    tmp24 = tl.load(in_ptr4 + x0, None, eviction_policy='evict_last')
    tmp1 = tl.full([XBLOCK], 4, tl.int32)
    tmp2 = tmp0 + tmp1
    tmp3 = tmp0 < 0
    tmp4 = tl.where(tmp3, tmp2, tmp0)
    tmp6 = tmp5 + tmp1
    tmp7 = tmp5 < 0
    tmp8 = tl.where(tmp7, tmp6, tmp5)
    tmp9 = tl.load(in_ptr2 + (tmp8 + 4 * tmp4 + 16 * x2), None,
        eviction_policy='evict_last')
    tmp10 = 0.0
    tmp11 = tmp9 > tmp10
    tmp12 = 0.01
    tmp13 = tmp9 * tmp12
    tmp14 = tl.where(tmp11, tmp9, tmp13)
    tmp16 = tmp15 + tmp1
    tmp17 = tmp15 < 0
    tmp18 = tl.where(tmp17, tmp16, tmp15)
    tmp19 = tl.load(in_ptr2 + (tmp18 + 4 * tmp4 + 16 * x2), None,
        eviction_policy='evict_last')
    tmp20 = tmp19 > tmp10
    tmp21 = tmp19 * tmp12
    tmp22 = tl.where(tmp20, tmp19, tmp21)
    tmp23 = tmp22 - tmp14
    tmp25 = tmp23 * tmp24
    tmp26 = tmp14 + tmp25
    tl.store(out_ptr0 + x4, tmp26, None)


@triton.jit
def triton_poi_fused_cat_20(in_ptr0, in_ptr1, in_ptr2, in_ptr3, in_ptr4,
    in_ptr5, in_ptr6, in_ptr7, out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    tl.full([XBLOCK], True, tl.int1)
    x2 = xindex // 64 % 128
    x3 = xindex // 8192
    x4 = xindex % 64
    x1 = xindex // 8 % 8
    x0 = xindex % 8
    x5 = xindex
    tmp0 = x2
    tl.full([1], 0, tl.int64)
    tmp3 = tl.full([1], 64, tl.int64)
    tmp4 = tmp0 < tmp3
    tmp5 = tl.load(in_ptr0 + (x4 + 64 * x2 + 4096 * x3), tmp4, other=0.0)
    tmp6 = tl.load(in_ptr1 + x1, tmp4, eviction_policy='evict_last', other=0.0)
    tmp7 = tl.full([XBLOCK], 4, tl.int32)
    tmp8 = tmp6 + tmp7
    tmp9 = tmp6 < 0
    tmp10 = tl.where(tmp9, tmp8, tmp6)
    tmp11 = tl.load(in_ptr2 + x0, tmp4, eviction_policy='evict_last', other=0.0
        )
    tmp12 = tmp11 + tmp7
    tmp13 = tmp11 < 0
    tmp14 = tl.where(tmp13, tmp12, tmp11)
    tmp15 = tl.load(in_ptr3 + (tmp14 + 4 * tmp10 + 16 * x2 + 1024 * x3),
        tmp4, eviction_policy='evict_last', other=0.0)
    tmp16 = 0.0
    tmp17 = tmp15 > tmp16
    tmp18 = 0.01
    tmp19 = tmp15 * tmp18
    tmp20 = tl.where(tmp17, tmp15, tmp19)
    tmp21 = tl.load(in_ptr4 + x0, tmp4, eviction_policy='evict_last', other=0.0
        )
    tmp22 = tmp21 + tmp7
    tmp23 = tmp21 < 0
    tmp24 = tl.where(tmp23, tmp22, tmp21)
    tmp25 = tl.load(in_ptr3 + (tmp24 + 4 * tmp10 + 16 * x2 + 1024 * x3),
        tmp4, eviction_policy='evict_last', other=0.0)
    tmp26 = tmp25 > tmp16
    tmp27 = tmp25 * tmp18
    tmp28 = tl.where(tmp26, tmp25, tmp27)
    tmp29 = tmp28 - tmp20
    tmp30 = tl.load(in_ptr5 + x0, tmp4, eviction_policy='evict_last', other=0.0
        )
    tmp31 = tmp29 * tmp30
    tmp32 = tmp20 + tmp31
    tmp33 = tmp32 - tmp5
    tmp34 = tl.load(in_ptr6 + x1, tmp4, eviction_policy='evict_last', other=0.0
        )
    tmp35 = tmp33 * tmp34
    tmp36 = tmp5 + tmp35
    tmp37 = tl.full(tmp36.shape, 0.0, tmp36.dtype)
    tmp38 = tl.where(tmp4, tmp36, tmp37)
    tmp39 = tmp0 >= tmp3
    tl.full([1], 128, tl.int64)
    tmp42 = tl.load(in_ptr7 + (x4 + 64 * (-64 + x2) + 4096 * x3), tmp39,
        other=0.0)
    tmp43 = tl.where(tmp4, tmp38, tmp42)
    tl.store(out_ptr0 + x5, tmp43, None)


@triton.jit
def triton_poi_fused_reflection_pad2d_21(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 % 10
    x1 = xindex // 10 % 10
    x2 = xindex // 100
    x3 = xindex
    tmp0 = tl.load(in_ptr0 + (63 + -1 * tl_math.abs(-7 + tl_math.abs(-1 +
        x0)) + -8 * tl_math.abs(-7 + tl_math.abs(-1 + x1)) + 64 * x2), None,
        eviction_policy='evict_last')
    tl.store(out_ptr0 + x3, tmp0, None)


@triton.jit
def triton_poi_fused_convolution_leaky_relu_reflection_pad2d_22(in_ptr0,
    in_ptr1, out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 12800
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 10
    x1 = xindex // 10 % 10
    x4 = xindex // 100
    x2 = xindex // 100 % 32
    x5 = xindex
    tmp0 = tl.load(in_ptr0 + (63 + -1 * tl_math.abs(-7 + tl_math.abs(-1 +
        x0)) + -8 * tl_math.abs(-7 + tl_math.abs(-1 + x1)) + 64 * x4),
        xmask, eviction_policy='evict_last')
    tmp1 = tl.load(in_ptr1 + x2, 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(out_ptr0 + x5, tmp7, xmask)


@triton.jit
def triton_poi_fused_arange_23(out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 16
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex
    tmp0 = x0
    tl.store(out_ptr0 + x0, tmp0, xmask)


@triton.jit
def triton_poi_fused__to_copy_24(out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 16
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex
    tmp0 = x0
    tmp1 = tmp0.to(tl.float32)
    tmp2 = 0.5
    tmp3 = tmp1 + tmp2
    tmp4 = tmp3 * tmp2
    tmp5 = tmp4 - tmp2
    tmp6 = 0.0
    tmp7 = triton_helpers.maximum(tmp5, tmp6)
    tmp8 = tmp7.to(tl.int32)
    tl.store(out_ptr0 + x0, tmp8, xmask)


@triton.jit
def triton_poi_fused_add_clamp_25(out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 16
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex
    tmp0 = x0
    tmp1 = tmp0.to(tl.float32)
    tmp2 = 0.5
    tmp3 = tmp1 + tmp2
    tmp4 = tmp3 * tmp2
    tmp5 = tmp4 - tmp2
    tmp6 = 0.0
    tmp7 = triton_helpers.maximum(tmp5, tmp6)
    tmp8 = tmp7.to(tl.int32)
    tmp9 = tl.full([1], 1, tl.int64)
    tmp10 = tmp8 + tmp9
    tmp11 = tl.full([1], 7, tl.int64)
    tmp12 = triton_helpers.minimum(tmp10, tmp11)
    tl.store(out_ptr0 + x0, tmp12, xmask)


@triton.jit
def triton_poi_fused__to_copy_add_clamp_mul_sub_26(out_ptr0, xnumel, XBLOCK:
    tl.constexpr):
    xnumel = 16
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex
    tmp0 = x0
    tmp1 = tmp0.to(tl.float32)
    tmp2 = 0.5
    tmp3 = tmp1 + tmp2
    tmp4 = tmp3 * tmp2
    tmp5 = tmp4 - tmp2
    tmp6 = 0.0
    tmp7 = triton_helpers.maximum(tmp5, tmp6)
    tmp8 = tmp7.to(tl.int32)
    tmp9 = tmp8.to(tl.float32)
    tmp10 = tmp7 - tmp9
    tmp11 = triton_helpers.maximum(tmp10, tmp6)
    tmp12 = 1.0
    tmp13 = triton_helpers.minimum(tmp11, tmp12)
    tl.store(out_ptr0 + x0, tmp13, xmask)


@triton.jit
def triton_poi_fused__unsafe_index_add_convolution_leaky_relu_mul_sub_27(
    in_out_ptr0, in_out_ptr1, in_ptr0, in_ptr1, in_ptr2, in_ptr3, in_ptr4,
    in_ptr5, in_ptr6, in_ptr7, in_ptr8, xnumel, XBLOCK: tl.constexpr):
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    tl.full([XBLOCK], True, tl.int1)
    x1 = xindex // 16 % 16
    x0 = xindex % 16
    x5 = xindex // 256
    x2 = xindex // 256 % 32
    x3 = xindex // 8192
    x6 = xindex
    tmp0 = tl.load(in_ptr0 + x1, None, eviction_policy='evict_last')
    tmp5 = tl.load(in_ptr1 + x0, None, eviction_policy='evict_last')
    tmp10 = tl.load(in_ptr3 + x2, None, eviction_policy='evict_last')
    tmp19 = tl.load(in_ptr5 + x1, None, eviction_policy='evict_last')
    tmp30 = tl.load(in_ptr6 + x0, None, eviction_policy='evict_last')
    tmp42 = tl.load(in_ptr7 + x0, None, eviction_policy='evict_last')
    tmp56 = tl.load(in_ptr8 + x1, None, eviction_policy='evict_last')
    tmp1 = tl.full([XBLOCK], 8, tl.int32)
    tmp2 = tmp0 + tmp1
    tmp3 = tmp0 < 0
    tmp4 = tl.where(tmp3, tmp2, tmp0)
    tmp6 = tmp5 + tmp1
    tmp7 = tmp5 < 0
    tmp8 = tl.where(tmp7, tmp6, tmp5)
    tmp9 = tl.load(in_ptr2 + (tmp8 + 8 * tmp4 + 64 * x5), None,
        eviction_policy='evict_last')
    tmp11 = tmp9 + tmp10
    tmp12 = tl.load(in_ptr4 + (tmp8 + 8 * tmp4 + 64 * x2 + 8192 * x3), None,
        eviction_policy='evict_last')
    tmp13 = tmp11 + tmp12
    tmp14 = 0.0
    tmp15 = tmp13 > tmp14
    tmp16 = 0.01
    tmp17 = tmp13 * tmp16
    tmp18 = tl.where(tmp15, tmp13, tmp17)
    tmp20 = tmp19 + tmp1
    tmp21 = tmp19 < 0
    tmp22 = tl.where(tmp21, tmp20, tmp19)
    tmp23 = tl.load(in_ptr2 + (tmp8 + 8 * tmp22 + 64 * x5), None,
        eviction_policy='evict_last')
    tmp24 = tmp23 + tmp10
    tmp25 = tl.load(in_ptr4 + (tmp8 + 8 * tmp22 + 64 * x2 + 8192 * x3),
        None, eviction_policy='evict_last')
    tmp26 = tmp24 + tmp25
    tmp27 = tmp26 > tmp14
    tmp28 = tmp26 * tmp16
    tmp29 = tl.where(tmp27, tmp26, tmp28)
    tmp31 = tmp30 + tmp1
    tmp32 = tmp30 < 0
    tmp33 = tl.where(tmp32, tmp31, tmp30)
    tmp34 = tl.load(in_ptr2 + (tmp33 + 8 * tmp22 + 64 * x5), None,
        eviction_policy='evict_last')
    tmp35 = tmp34 + tmp10
    tmp36 = tl.load(in_ptr4 + (tmp33 + 8 * tmp22 + 64 * x2 + 8192 * x3),
        None, eviction_policy='evict_last')
    tmp37 = tmp35 + tmp36
    tmp38 = tmp37 > tmp14
    tmp39 = tmp37 * tmp16
    tmp40 = tl.where(tmp38, tmp37, tmp39)
    tmp41 = tmp40 - tmp29
    tmp43 = tmp41 * tmp42
    tmp44 = tmp29 + tmp43
    tmp45 = tl.load(in_ptr2 + (tmp33 + 8 * tmp4 + 64 * x5), None,
        eviction_policy='evict_last')
    tmp46 = tmp45 + tmp10
    tmp47 = tl.load(in_ptr4 + (tmp33 + 8 * tmp4 + 64 * x2 + 8192 * x3),
        None, eviction_policy='evict_last')
    tmp48 = tmp46 + tmp47
    tmp49 = tmp48 > tmp14
    tmp50 = tmp48 * tmp16
    tmp51 = tl.where(tmp49, tmp48, tmp50)
    tmp52 = tmp51 - tmp18
    tmp53 = tmp52 * tmp42
    tmp54 = tmp18 + tmp53
    tmp55 = tmp54 - tmp44
    tmp57 = tmp55 * tmp56
    tl.store(in_out_ptr0 + x6, tmp44, None)
    tl.store(in_out_ptr1 + x6, tmp57, None)


@triton.jit
def triton_poi_fused_cat_reflection_pad2d_28(in_ptr0, in_ptr1, in_ptr2,
    out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 82944
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x2 = xindex // 324 % 64
    x0 = xindex % 18
    x1 = xindex // 18 % 18
    x3 = xindex // 20736
    x4 = xindex
    tmp0 = x2
    tl.full([1], 0, tl.int64)
    tmp3 = tl.full([1], 32, tl.int64)
    tmp4 = tmp0 < tmp3
    tmp5 = tl.load(in_ptr0 + (255 + -1 * tl_math.abs(-15 + tl_math.abs(-1 +
        x0)) + -16 * tl_math.abs(-15 + tl_math.abs(-1 + x1)) + 256 * x2 + 
        8192 * x3), tmp4 & xmask, eviction_policy='evict_last', other=0.0)
    tmp6 = tl.load(in_ptr1 + (255 + -1 * tl_math.abs(-15 + tl_math.abs(-1 +
        x0)) + -16 * tl_math.abs(-15 + tl_math.abs(-1 + x1)) + 256 * x2 + 
        8192 * x3), tmp4 & xmask, eviction_policy='evict_last', other=0.0)
    tmp7 = tmp5 + tmp6
    tmp8 = tl.full(tmp7.shape, 0.0, tmp7.dtype)
    tmp9 = tl.where(tmp4, tmp7, tmp8)
    tmp10 = tmp0 >= tmp3
    tl.full([1], 64, tl.int64)
    tmp13 = tl.load(in_ptr2 + (255 + -1 * tl_math.abs(-15 + tl_math.abs(-1 +
        x0)) + -16 * tl_math.abs(-15 + tl_math.abs(-1 + x1)) + 256 * (-32 +
        x2) + 8192 * x3), tmp10 & xmask, eviction_policy='evict_last',
        other=0.0)
    tmp14 = tl.where(tmp4, tmp9, tmp13)
    tl.store(out_ptr0 + x4, tmp14, xmask)


@triton.jit
def triton_poi_fused_convolution_leaky_relu_reflection_pad2d_29(in_ptr0,
    in_ptr1, out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 20736
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 18
    x1 = xindex // 18 % 18
    x4 = xindex // 324
    x2 = xindex // 324 % 16
    x5 = xindex
    tmp0 = tl.load(in_ptr0 + (255 + -1 * tl_math.abs(-15 + tl_math.abs(-1 +
        x0)) + -16 * tl_math.abs(-15 + tl_math.abs(-1 + x1)) + 256 * x4),
        xmask, eviction_policy='evict_last')
    tmp1 = tl.load(in_ptr1 + x2, 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(out_ptr0 + x5, tmp7, xmask)


@triton.jit
def triton_poi_fused_add_convolution_leaky_relu_leaky_relu_backward_30(
    in_out_ptr0, in_ptr0, in_ptr1, in_ptr2, in_ptr3, out_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 // 256 % 16
    x0 = xindex % 256
    x2 = xindex // 4096
    tmp0 = tl.load(in_out_ptr0 + x3, None)
    tmp1 = tl.load(in_ptr0 + x1, None, eviction_policy='evict_last')
    tmp2 = tmp0 + tmp1
    tmp3 = x1
    tl.full([1], 0, tl.int64)
    tmp6 = tl.full([1], 32, tl.int64)
    tmp7 = tmp3 < tmp6
    tmp8 = tl.load(in_ptr1 + (x0 + 256 * x1 + 8192 * x2), tmp7, other=0.0)
    tmp9 = tl.load(in_ptr2 + (x0 + 256 * x1 + 8192 * x2), tmp7, other=0.0)
    tmp10 = tmp8 + tmp9
    tmp11 = tl.full(tmp10.shape, 0.0, tmp10.dtype)
    tmp12 = tl.where(tmp7, tmp10, tmp11)
    tmp13 = tmp3 >= tmp6
    tl.full([1], 64, tl.int64)
    tmp16 = tl.load(in_ptr3 + (x0 + 256 * (-32 + x1) + 8192 * x2), tmp13,
        other=0.0)
    tmp17 = tl.where(tmp7, tmp12, tmp16)
    tmp18 = tmp2 + tmp17
    tmp19 = 0.0
    tmp20 = tmp18 > tmp19
    tmp21 = 0.01
    tmp22 = tmp18 * tmp21
    tmp23 = tl.where(tmp20, tmp18, tmp22)
    tmp24 = tmp23 > tmp19
    tl.store(in_out_ptr0 + x3, tmp18, None)
    tl.store(out_ptr0 + x3, tmp24, None)


@triton.jit
def triton_poi_fused_arange_31(out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 32
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex
    tmp0 = x0
    tl.store(out_ptr0 + x0, tmp0, xmask)


@triton.jit
def triton_poi_fused__to_copy_32(out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 32
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex
    tmp0 = x0
    tmp1 = tmp0.to(tl.float32)
    tmp2 = 0.5
    tmp3 = tmp1 + tmp2
    tmp4 = tmp3 * tmp2
    tmp5 = tmp4 - tmp2
    tmp6 = 0.0
    tmp7 = triton_helpers.maximum(tmp5, tmp6)
    tmp8 = tmp7.to(tl.int32)
    tl.store(out_ptr0 + x0, tmp8, xmask)


@triton.jit
def triton_poi_fused_add_clamp_33(out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 32
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex
    tmp0 = x0
    tmp1 = tmp0.to(tl.float32)
    tmp2 = 0.5
    tmp3 = tmp1 + tmp2
    tmp4 = tmp3 * tmp2
    tmp5 = tmp4 - tmp2
    tmp6 = 0.0
    tmp7 = triton_helpers.maximum(tmp5, tmp6)
    tmp8 = tmp7.to(tl.int32)
    tmp9 = tl.full([1], 1, tl.int64)
    tmp10 = tmp8 + tmp9
    tmp11 = tl.full([1], 15, tl.int64)
    tmp12 = triton_helpers.minimum(tmp10, tmp11)
    tl.store(out_ptr0 + x0, tmp12, xmask)


@triton.jit
def triton_poi_fused__to_copy_add_clamp_mul_sub_34(out_ptr0, xnumel, XBLOCK:
    tl.constexpr):
    xnumel = 32
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex
    tmp0 = x0
    tmp1 = tmp0.to(tl.float32)
    tmp2 = 0.5
    tmp3 = tmp1 + tmp2
    tmp4 = tmp3 * tmp2
    tmp5 = tmp4 - tmp2
    tmp6 = 0.0
    tmp7 = triton_helpers.maximum(tmp5, tmp6)
    tmp8 = tmp7.to(tl.int32)
    tmp9 = tmp8.to(tl.float32)
    tmp10 = tmp7 - tmp9
    tmp11 = triton_helpers.maximum(tmp10, tmp6)
    tmp12 = 1.0
    tmp13 = triton_helpers.minimum(tmp11, tmp12)
    tl.store(out_ptr0 + x0, tmp13, xmask)


@triton.jit
def triton_poi_fused__unsafe_index_add_leaky_relu_mul_sub_35(in_ptr0,
    in_ptr1, in_ptr2, in_ptr3, in_ptr4, out_ptr0, xnumel, XBLOCK: tl.constexpr
    ):
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    tl.full([XBLOCK], True, tl.int1)
    x1 = xindex // 32 % 32
    x0 = xindex % 32
    x2 = xindex // 1024
    x4 = xindex
    tmp0 = tl.load(in_ptr0 + x1, None, eviction_policy='evict_last')
    tmp5 = tl.load(in_ptr1 + x0, None, eviction_policy='evict_last')
    tmp15 = tl.load(in_ptr3 + x0, None, eviction_policy='evict_last')
    tmp24 = tl.load(in_ptr4 + x0, None, eviction_policy='evict_last')
    tmp1 = tl.full([XBLOCK], 16, tl.int32)
    tmp2 = tmp0 + tmp1
    tmp3 = tmp0 < 0
    tmp4 = tl.where(tmp3, tmp2, tmp0)
    tmp6 = tmp5 + tmp1
    tmp7 = tmp5 < 0
    tmp8 = tl.where(tmp7, tmp6, tmp5)
    tmp9 = tl.load(in_ptr2 + (tmp8 + 16 * tmp4 + 256 * x2), None,
        eviction_policy='evict_last')
    tmp10 = 0.0
    tmp11 = tmp9 > tmp10
    tmp12 = 0.01
    tmp13 = tmp9 * tmp12
    tmp14 = tl.where(tmp11, tmp9, tmp13)
    tmp16 = tmp15 + tmp1
    tmp17 = tmp15 < 0
    tmp18 = tl.where(tmp17, tmp16, tmp15)
    tmp19 = tl.load(in_ptr2 + (tmp18 + 16 * tmp4 + 256 * x2), None,
        eviction_policy='evict_last')
    tmp20 = tmp19 > tmp10
    tmp21 = tmp19 * tmp12
    tmp22 = tl.where(tmp20, tmp19, tmp21)
    tmp23 = tmp22 - tmp14
    tmp25 = tmp23 * tmp24
    tmp26 = tmp14 + tmp25
    tl.store(out_ptr0 + x4, tmp26, None)


@triton.jit
def triton_poi_fused_cat_36(in_ptr0, in_ptr1, in_ptr2, in_ptr3, in_ptr4,
    in_ptr5, in_ptr6, in_ptr7, out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    tl.full([XBLOCK], True, tl.int1)
    x2 = xindex // 1024 % 32
    x3 = xindex // 32768
    x4 = xindex % 1024
    x1 = xindex // 32 % 32
    x0 = xindex % 32
    x5 = xindex
    tmp0 = x2
    tl.full([1], 0, tl.int64)
    tmp3 = tl.full([1], 16, tl.int64)
    tmp4 = tmp0 < tmp3
    tmp5 = tl.load(in_ptr0 + (x4 + 1024 * x2 + 16384 * x3), tmp4, other=0.0)
    tmp6 = tl.load(in_ptr1 + x1, tmp4, eviction_policy='evict_last', other=0.0)
    tmp7 = tl.full([XBLOCK], 16, tl.int32)
    tmp8 = tmp6 + tmp7
    tmp9 = tmp6 < 0
    tmp10 = tl.where(tmp9, tmp8, tmp6)
    tmp11 = tl.load(in_ptr2 + x0, tmp4, eviction_policy='evict_last', other=0.0
        )
    tmp12 = tmp11 + tmp7
    tmp13 = tmp11 < 0
    tmp14 = tl.where(tmp13, tmp12, tmp11)
    tmp15 = tl.load(in_ptr3 + (tmp14 + 16 * tmp10 + 256 * x2 + 4096 * x3),
        tmp4, eviction_policy='evict_last', other=0.0)
    tmp16 = 0.0
    tmp17 = tmp15 > tmp16
    tmp18 = 0.01
    tmp19 = tmp15 * tmp18
    tmp20 = tl.where(tmp17, tmp15, tmp19)
    tmp21 = tl.load(in_ptr4 + x0, tmp4, eviction_policy='evict_last', other=0.0
        )
    tmp22 = tmp21 + tmp7
    tmp23 = tmp21 < 0
    tmp24 = tl.where(tmp23, tmp22, tmp21)
    tmp25 = tl.load(in_ptr3 + (tmp24 + 16 * tmp10 + 256 * x2 + 4096 * x3),
        tmp4, eviction_policy='evict_last', other=0.0)
    tmp26 = tmp25 > tmp16
    tmp27 = tmp25 * tmp18
    tmp28 = tl.where(tmp26, tmp25, tmp27)
    tmp29 = tmp28 - tmp20
    tmp30 = tl.load(in_ptr5 + x0, tmp4, eviction_policy='evict_last', other=0.0
        )
    tmp31 = tmp29 * tmp30
    tmp32 = tmp20 + tmp31
    tmp33 = tmp32 - tmp5
    tmp34 = tl.load(in_ptr6 + x1, tmp4, eviction_policy='evict_last', other=0.0
        )
    tmp35 = tmp33 * tmp34
    tmp36 = tmp5 + tmp35
    tmp37 = tl.full(tmp36.shape, 0.0, tmp36.dtype)
    tmp38 = tl.where(tmp4, tmp36, tmp37)
    tmp39 = tmp0 >= tmp3
    tl.full([1], 32, tl.int64)
    tmp42 = tl.load(in_ptr7 + (x4 + 1024 * (-16 + x2) + 16384 * x3), tmp39,
        other=0.0)
    tmp43 = tl.where(tmp4, tmp38, tmp42)
    tl.store(out_ptr0 + x5, tmp43, None)


@triton.jit
def triton_poi_fused_reflection_pad2d_37(in_ptr0, out_ptr0, xnumel, XBLOCK:
    tl.constexpr):
    xnumel = 147968
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 34
    x1 = xindex // 34 % 34
    x2 = xindex // 1156
    x3 = xindex
    tmp0 = tl.load(in_ptr0 + (1023 + -1 * tl_math.abs(-31 + tl_math.abs(-1 +
        x0)) + -32 * tl_math.abs(-31 + tl_math.abs(-1 + x1)) + 1024 * x2),
        xmask, eviction_policy='evict_last')
    tl.store(out_ptr0 + x3, tmp0, xmask)


@triton.jit
def triton_poi_fused_convolution_leaky_relu_reflection_pad2d_38(in_ptr0,
    in_ptr1, out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 36992
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 34
    x1 = xindex // 34 % 34
    x4 = xindex // 1156
    x2 = xindex // 1156 % 8
    x5 = xindex
    tmp0 = tl.load(in_ptr0 + (1023 + -1 * tl_math.abs(-31 + tl_math.abs(-1 +
        x0)) + -32 * tl_math.abs(-31 + tl_math.abs(-1 + x1)) + 1024 * x4),
        xmask, eviction_policy='evict_last')
    tmp1 = tl.load(in_ptr1 + x2, 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(out_ptr0 + x5, tmp7, xmask)


@triton.jit
def triton_poi_fused_arange_39(out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 64
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex
    tmp0 = x0
    tl.store(out_ptr0 + x0, tmp0, xmask)


@triton.jit
def triton_poi_fused__to_copy_40(out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 64
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex
    tmp0 = x0
    tmp1 = tmp0.to(tl.float32)
    tmp2 = 0.5
    tmp3 = tmp1 + tmp2
    tmp4 = tmp3 * tmp2
    tmp5 = tmp4 - tmp2
    tmp6 = 0.0
    tmp7 = triton_helpers.maximum(tmp5, tmp6)
    tmp8 = tmp7.to(tl.int32)
    tl.store(out_ptr0 + x0, tmp8, xmask)


@triton.jit
def triton_poi_fused_add_clamp_41(out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 64
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex
    tmp0 = x0
    tmp1 = tmp0.to(tl.float32)
    tmp2 = 0.5
    tmp3 = tmp1 + tmp2
    tmp4 = tmp3 * tmp2
    tmp5 = tmp4 - tmp2
    tmp6 = 0.0
    tmp7 = triton_helpers.maximum(tmp5, tmp6)
    tmp8 = tmp7.to(tl.int32)
    tmp9 = tl.full([1], 1, tl.int64)
    tmp10 = tmp8 + tmp9
    tmp11 = tl.full([1], 31, tl.int64)
    tmp12 = triton_helpers.minimum(tmp10, tmp11)
    tl.store(out_ptr0 + x0, tmp12, xmask)


@triton.jit
def triton_poi_fused__to_copy_add_clamp_mul_sub_42(out_ptr0, xnumel, XBLOCK:
    tl.constexpr):
    xnumel = 64
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex
    tmp0 = x0
    tmp1 = tmp0.to(tl.float32)
    tmp2 = 0.5
    tmp3 = tmp1 + tmp2
    tmp4 = tmp3 * tmp2
    tmp5 = tmp4 - tmp2
    tmp6 = 0.0
    tmp7 = triton_helpers.maximum(tmp5, tmp6)
    tmp8 = tmp7.to(tl.int32)
    tmp9 = tmp8.to(tl.float32)
    tmp10 = tmp7 - tmp9
    tmp11 = triton_helpers.maximum(tmp10, tmp6)
    tmp12 = 1.0
    tmp13 = triton_helpers.minimum(tmp11, tmp12)
    tl.store(out_ptr0 + x0, tmp13, xmask)


@triton.jit
def triton_poi_fused__unsafe_index_add_convolution_leaky_relu_mul_sub_43(
    in_out_ptr0, in_out_ptr1, in_ptr0, in_ptr1, in_ptr2, in_ptr3, in_ptr4,
    in_ptr5, in_ptr6, in_ptr7, in_ptr8, xnumel, XBLOCK: tl.constexpr):
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    tl.full([XBLOCK], True, tl.int1)
    x1 = xindex // 64 % 64
    x0 = xindex % 64
    x5 = xindex // 4096
    x2 = xindex // 4096 % 8
    x3 = xindex // 32768
    x6 = xindex
    tmp0 = tl.load(in_ptr0 + x1, None, eviction_policy='evict_last')
    tmp5 = tl.load(in_ptr1 + x0, None, eviction_policy='evict_last')
    tmp10 = tl.load(in_ptr3 + x2, None, eviction_policy='evict_last')
    tmp19 = tl.load(in_ptr5 + x1, None, eviction_policy='evict_last')
    tmp30 = tl.load(in_ptr6 + x0, None, eviction_policy='evict_last')
    tmp42 = tl.load(in_ptr7 + x0, None, eviction_policy='evict_last')
    tmp56 = tl.load(in_ptr8 + x1, None, eviction_policy='evict_last')
    tmp1 = tl.full([XBLOCK], 32, tl.int32)
    tmp2 = tmp0 + tmp1
    tmp3 = tmp0 < 0
    tmp4 = tl.where(tmp3, tmp2, tmp0)
    tmp6 = tmp5 + tmp1
    tmp7 = tmp5 < 0
    tmp8 = tl.where(tmp7, tmp6, tmp5)
    tmp9 = tl.load(in_ptr2 + (tmp8 + 32 * tmp4 + 1024 * x5), None,
        eviction_policy='evict_last')
    tmp11 = tmp9 + tmp10
    tmp12 = tl.load(in_ptr4 + (tmp8 + 32 * tmp4 + 1024 * x2 + 32768 * x3),
        None, eviction_policy='evict_last')
    tmp13 = tmp11 + tmp12
    tmp14 = 0.0
    tmp15 = tmp13 > tmp14
    tmp16 = 0.01
    tmp17 = tmp13 * tmp16
    tmp18 = tl.where(tmp15, tmp13, tmp17)
    tmp20 = tmp19 + tmp1
    tmp21 = tmp19 < 0
    tmp22 = tl.where(tmp21, tmp20, tmp19)
    tmp23 = tl.load(in_ptr2 + (tmp8 + 32 * tmp22 + 1024 * x5), None,
        eviction_policy='evict_last')
    tmp24 = tmp23 + tmp10
    tmp25 = tl.load(in_ptr4 + (tmp8 + 32 * tmp22 + 1024 * x2 + 32768 * x3),
        None, eviction_policy='evict_last')
    tmp26 = tmp24 + tmp25
    tmp27 = tmp26 > tmp14
    tmp28 = tmp26 * tmp16
    tmp29 = tl.where(tmp27, tmp26, tmp28)
    tmp31 = tmp30 + tmp1
    tmp32 = tmp30 < 0
    tmp33 = tl.where(tmp32, tmp31, tmp30)
    tmp34 = tl.load(in_ptr2 + (tmp33 + 32 * tmp22 + 1024 * x5), None,
        eviction_policy='evict_last')
    tmp35 = tmp34 + tmp10
    tmp36 = tl.load(in_ptr4 + (tmp33 + 32 * tmp22 + 1024 * x2 + 32768 * x3),
        None, eviction_policy='evict_last')
    tmp37 = tmp35 + tmp36
    tmp38 = tmp37 > tmp14
    tmp39 = tmp37 * tmp16
    tmp40 = tl.where(tmp38, tmp37, tmp39)
    tmp41 = tmp40 - tmp29
    tmp43 = tmp41 * tmp42
    tmp44 = tmp29 + tmp43
    tmp45 = tl.load(in_ptr2 + (tmp33 + 32 * tmp4 + 1024 * x5), None,
        eviction_policy='evict_last')
    tmp46 = tmp45 + tmp10
    tmp47 = tl.load(in_ptr4 + (tmp33 + 32 * tmp4 + 1024 * x2 + 32768 * x3),
        None, eviction_policy='evict_last')
    tmp48 = tmp46 + tmp47
    tmp49 = tmp48 > tmp14
    tmp50 = tmp48 * tmp16
    tmp51 = tl.where(tmp49, tmp48, tmp50)
    tmp52 = tmp51 - tmp18
    tmp53 = tmp52 * tmp42
    tmp54 = tmp18 + tmp53
    tmp55 = tmp54 - tmp44
    tmp57 = tmp55 * tmp56
    tl.store(in_out_ptr0 + x6, tmp44, None)
    tl.store(in_out_ptr1 + x6, tmp57, None)


@triton.jit
def triton_poi_fused_cat_reflection_pad2d_44(in_ptr0, in_ptr1, in_ptr2,
    out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 278784
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x2 = xindex // 4356 % 16
    x0 = xindex % 66
    x1 = xindex // 66 % 66
    x3 = xindex // 69696
    x4 = xindex
    tmp0 = x2
    tl.full([1], 0, tl.int64)
    tmp3 = tl.full([1], 8, tl.int64)
    tmp4 = tmp0 < tmp3
    tmp5 = tl.load(in_ptr0 + (4095 + -1 * tl_math.abs(-63 + tl_math.abs(-1 +
        x0)) + -64 * tl_math.abs(-63 + tl_math.abs(-1 + x1)) + 4096 * x2 + 
        32768 * x3), tmp4 & xmask, eviction_policy='evict_last', other=0.0)
    tmp6 = tl.load(in_ptr1 + (4095 + -1 * tl_math.abs(-63 + tl_math.abs(-1 +
        x0)) + -64 * tl_math.abs(-63 + tl_math.abs(-1 + x1)) + 4096 * x2 + 
        32768 * x3), tmp4 & xmask, eviction_policy='evict_last', other=0.0)
    tmp7 = tmp5 + tmp6
    tmp8 = tl.full(tmp7.shape, 0.0, tmp7.dtype)
    tmp9 = tl.where(tmp4, tmp7, tmp8)
    tmp10 = tmp0 >= tmp3
    tl.full([1], 16, tl.int64)
    tmp13 = tl.load(in_ptr2 + (4095 + -1 * tl_math.abs(-63 + tl_math.abs(-1 +
        x0)) + -64 * tl_math.abs(-63 + tl_math.abs(-1 + x1)) + 4096 * (-8 +
        x2) + 32768 * x3), tmp10 & xmask, eviction_policy='evict_last',
        other=0.0)
    tmp14 = tl.where(tmp4, tmp9, tmp13)
    tl.store(out_ptr0 + x4, tmp14, xmask)


@triton.jit
def triton_poi_fused_convolution_leaky_relu_reflection_pad2d_45(in_ptr0,
    in_ptr1, out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 17424
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 66
    x1 = xindex // 66 % 66
    x2 = xindex // 4356
    x3 = xindex
    tmp0 = tl.load(in_ptr0 + (4095 + -1 * tl_math.abs(-63 + tl_math.abs(-1 +
        x0)) + -64 * tl_math.abs(-63 + tl_math.abs(-1 + x1)) + 4096 * x2),
        xmask, eviction_policy='evict_last')
    tmp1 = tl.load(in_ptr1 + 0)
    tmp2 = tl.broadcast_to(tmp1, [XBLOCK])
    tmp3 = tmp0 + tmp2
    tmp4 = 0.0
    tmp5 = tmp3 > tmp4
    tmp6 = 0.01
    tmp7 = tmp3 * tmp6
    tmp8 = tl.where(tmp5, tmp3, tmp7)
    tl.store(out_ptr0 + x3, tmp8, xmask)


@triton.jit
def triton_poi_fused_add_convolution_leaky_relu_leaky_relu_backward_46(
    in_out_ptr0, in_ptr0, in_ptr1, in_ptr2, in_ptr3, in_ptr4, in_ptr5,
    in_ptr6, out_ptr0, out_ptr1, out_ptr2, xnumel, XBLOCK: tl.constexpr):
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    tl.full([XBLOCK], True, tl.int1)
    x2 = xindex
    x0 = xindex % 4096
    x1 = xindex // 4096
    tmp0 = tl.load(in_out_ptr0 + x2, None)
    tmp1 = tl.load(in_ptr0 + 0)
    tmp2 = tl.broadcast_to(tmp1, [XBLOCK])
    tmp24 = tl.load(in_ptr4 + x2, None)
    tmp25 = tl.load(in_ptr5 + 0)
    tmp26 = tl.broadcast_to(tmp25, [XBLOCK])
    tmp28 = tl.load(in_ptr6 + x2, None)
    tmp3 = tmp0 + tmp2
    tmp4 = tl.full([1], 0, tl.int64)
    tmp6 = tl.full([1], 8, tl.int64)
    tmp7 = tmp4 < tmp6
    tmp8 = tl.load(in_ptr1 + (x0 + 4096 * 0 + 32768 * x1), tmp7, other=0.0)
    tmp9 = tl.load(in_ptr2 + (x0 + 4096 * 0 + 32768 * x1), tmp7, other=0.0)
    tmp10 = tmp8 + tmp9
    tmp11 = tl.full(tmp10.shape, 0.0, tmp10.dtype)
    tmp12 = tl.where(tmp7, tmp10, tmp11)
    tmp13 = tmp4 >= tmp6
    tl.full([1], 16, tl.int64)
    tmp16 = tl.load(in_ptr3 + (x0 + 4096 * -8 + 32768 * x1), tmp13, other=0.0)
    tmp17 = tl.where(tmp7, tmp12, tmp16)
    tmp18 = tmp3 + tmp17
    tmp19 = 0.0
    tmp20 = tmp18 > tmp19
    tmp21 = 0.01
    tmp22 = tmp18 * tmp21
    tmp23 = tl.where(tmp20, tmp18, tmp22)
    tmp27 = tmp24 + tmp26
    tmp29 = tmp27 + tmp28
    tmp30 = tmp29 > tmp19
    tmp31 = tmp29 * tmp21
    tmp32 = tl.where(tmp30, tmp29, tmp31)
    tmp33 = tmp23 + tmp32
    tmp34 = tmp32 > tmp19
    tmp35 = tmp23 > tmp19
    tl.store(out_ptr0 + x2, tmp33, None)
    tl.store(out_ptr1 + x2, tmp34, None)
    tl.store(out_ptr2 + x2, tmp35, None)


@triton.jit
def triton_poi_fused_convolution_leaky_relu_leaky_relu_backward_47(in_ptr0,
    in_ptr1, 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 = tl.load(in_ptr1 + 0)
    tmp2 = tl.broadcast_to(tmp1, [XBLOCK])
    tmp3 = tmp0 + tmp2
    tmp4 = 0.0
    tmp5 = tmp3 > tmp4
    tmp6 = 0.01
    tmp7 = tmp3 * tmp6
    tmp8 = tl.where(tmp5, tmp3, tmp7)
    tmp9 = tmp8 > tmp4
    tl.store(out_ptr0 + x0, tmp9, None)


@triton.jit
def triton_poi_fused_add_convolution_leaky_relu_leaky_relu_backward_48(in_ptr0,
    in_ptr1, in_ptr2, out_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 // 1024 % 8
    x2 = xindex // 8192
    x4 = xindex % 8192
    tmp0 = tl.load(in_ptr0 + x3, None)
    tmp1 = tl.load(in_ptr1 + x1, None, eviction_policy='evict_last')
    tmp3 = tl.load(in_ptr2 + (x4 + 32768 * x2), None)
    tmp2 = tmp0 + tmp1
    tmp4 = tmp2 + tmp3
    tmp5 = 0.0
    tmp6 = tmp4 > tmp5
    tmp7 = 0.01
    tmp8 = tmp4 * tmp7
    tmp9 = tl.where(tmp6, tmp4, tmp8)
    tmp10 = tmp9 > tmp5
    tl.store(out_ptr0 + x3, tmp10, None)


@triton.jit
def triton_poi_fused_convolution_leaky_relu_leaky_relu_backward_49(in_ptr0,
    in_ptr1, out_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 // 1024 % 8
    tmp0 = tl.load(in_ptr0 + x3, None)
    tmp1 = tl.load(in_ptr1 + 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)
    tmp8 = tmp7 > tmp3
    tl.store(out_ptr0 + x3, tmp8, None)


@triton.jit
def triton_poi_fused_convolution_leaky_relu_leaky_relu_backward_50(in_ptr0,
    in_ptr1, out_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 // 256 % 16
    tmp0 = tl.load(in_ptr0 + x3, None)
    tmp1 = tl.load(in_ptr1 + 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)
    tmp8 = tmp7 > tmp3
    tl.store(out_ptr0 + x3, tmp8, None)


@triton.jit
def triton_poi_fused_add_convolution_leaky_relu_leaky_relu_backward_51(in_ptr0,
    in_ptr1, in_ptr2, out_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 // 64 % 32
    x2 = xindex // 2048
    x4 = xindex % 2048
    tmp0 = tl.load(in_ptr0 + x3, None)
    tmp1 = tl.load(in_ptr1 + x1, None, eviction_policy='evict_last')
    tmp3 = tl.load(in_ptr2 + (x4 + 8192 * x2), None)
    tmp2 = tmp0 + tmp1
    tmp4 = tmp2 + tmp3
    tmp5 = 0.0
    tmp6 = tmp4 > tmp5
    tmp7 = 0.01
    tmp8 = tmp4 * tmp7
    tmp9 = tl.where(tmp6, tmp4, tmp8)
    tmp10 = tmp9 > tmp5
    tl.store(out_ptr0 + x3, tmp10, None)


@triton.jit
def triton_poi_fused_convolution_leaky_relu_leaky_relu_backward_52(in_ptr0,
    in_ptr1, out_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 // 64 % 32
    tmp0 = tl.load(in_ptr0 + x3, None)
    tmp1 = tl.load(in_ptr1 + 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)
    tmp8 = tmp7 > tmp3
    tl.store(out_ptr0 + x3, tmp8, None)


@triton.jit
def triton_poi_fused_convolution_leaky_relu_leaky_relu_backward_53(in_ptr0,
    in_ptr1, out_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_ptr0 + x3, None)
    tmp1 = tl.load(in_ptr1 + 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)
    tmp8 = tmp7 > tmp3
    tl.store(out_ptr0 + x3, tmp8, None)


@triton.jit
def triton_poi_fused_convolution_leaky_relu_leaky_relu_backward_54(in_ptr0,
    in_ptr1, out_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 // 64 % 64
    tmp0 = tl.load(in_ptr0 + x3, None)
    tmp1 = tl.load(in_ptr1 + 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)
    tmp8 = tmp7 > tmp3
    tl.store(out_ptr0 + x3, tmp8, None)


@triton.jit
def triton_poi_fused_convolution_leaky_relu_leaky_relu_backward_55(in_ptr0,
    in_ptr1, out_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 // 256 % 32
    tmp0 = tl.load(in_ptr0 + x3, None)
    tmp1 = tl.load(in_ptr1 + 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)
    tmp8 = tmp7 > tmp3
    tl.store(out_ptr0 + x3, tmp8, None)


@triton.jit
def triton_poi_fused_convolution_leaky_relu_leaky_relu_backward_56(in_ptr0,
    in_ptr1, out_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 // 1024 % 16
    tmp0 = tl.load(in_ptr0 + x3, None)
    tmp1 = tl.load(in_ptr1 + 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)
    tmp8 = tmp7 > tmp3
    tl.store(out_ptr0 + x3, tmp8, None)


@triton.jit
def triton_poi_fused_convolution_leaky_relu_leaky_relu_backward_57(in_ptr0,
    in_ptr1, out_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 // 4096 % 8
    tmp0 = tl.load(in_ptr0 + x3, None)
    tmp1 = tl.load(in_ptr1 + 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)
    tmp8 = tmp7 > tmp3
    tl.store(out_ptr0 + x3, tmp8, None)


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, primals_34, primals_35, primals_36, primals_37,
        primals_38, primals_39, primals_40, primals_41) = args
    args.clear()
    assert_size_stride(primals_1, (4, 1, 64, 64), (4096, 4096, 64, 1))
    assert_size_stride(primals_2, (8, 1, 3, 3), (9, 9, 3, 1))
    assert_size_stride(primals_3, (8,), (1,))
    assert_size_stride(primals_4, (8, 8, 3, 3), (72, 9, 3, 1))
    assert_size_stride(primals_5, (8,), (1,))
    assert_size_stride(primals_6, (16, 8, 3, 3), (72, 9, 3, 1))
    assert_size_stride(primals_7, (16,), (1,))
    assert_size_stride(primals_8, (16, 16, 3, 3), (144, 9, 3, 1))
    assert_size_stride(primals_9, (16,), (1,))
    assert_size_stride(primals_10, (32, 16, 3, 3), (144, 9, 3, 1))
    assert_size_stride(primals_11, (32,), (1,))
    assert_size_stride(primals_12, (32, 32, 3, 3), (288, 9, 3, 1))
    assert_size_stride(primals_13, (32,), (1,))
    assert_size_stride(primals_14, (64, 32, 3, 3), (288, 9, 3, 1))
    assert_size_stride(primals_15, (64,), (1,))
    assert_size_stride(primals_16, (64, 64, 3, 3), (576, 9, 3, 1))
    assert_size_stride(primals_17, (64,), (1,))
    assert_size_stride(primals_18, (64, 64, 3, 3), (576, 9, 3, 1))
    assert_size_stride(primals_19, (64,), (1,))
    assert_size_stride(primals_20, (64, 64, 3, 3), (576, 9, 3, 1))
    assert_size_stride(primals_21, (64,), (1,))
    assert_size_stride(primals_22, (32, 128, 3, 3), (1152, 9, 3, 1))
    assert_size_stride(primals_23, (32,), (1,))
    assert_size_stride(primals_24, (32, 32, 3, 3), (288, 9, 3, 1))
    assert_size_stride(primals_25, (32,), (1,))
    assert_size_stride(primals_26, (16, 64, 3, 3), (576, 9, 3, 1))
    assert_size_stride(primals_27, (16,), (1,))
    assert_size_stride(primals_28, (16, 16, 3, 3), (144, 9, 3, 1))
    assert_size_stride(primals_29, (16,), (1,))
    assert_size_stride(primals_30, (8, 32, 3, 3), (288, 9, 3, 1))
    assert_size_stride(primals_31, (8,), (1,))
    assert_size_stride(primals_32, (8, 8, 3, 3), (72, 9, 3, 1))
    assert_size_stride(primals_33, (8,), (1,))
    assert_size_stride(primals_34, (1, 16, 3, 3), (144, 9, 3, 1))
    assert_size_stride(primals_35, (1,), (1,))
    assert_size_stride(primals_36, (1, 1, 3, 3), (9, 9, 3, 1))
    assert_size_stride(primals_37, (1,), (1,))
    assert_size_stride(primals_38, (1, 1, 3, 3), (9, 9, 3, 1))
    assert_size_stride(primals_39, (1,), (1,))
    assert_size_stride(primals_40, (1, 1, 3, 3), (9, 9, 3, 1))
    assert_size_stride(primals_41, (1,), (1,))
    with torch.cuda._DeviceGuard(0):
        torch.cuda.set_device(0)
        buf0 = empty_strided_cuda((4, 1, 66, 66), (4356, 4356, 66, 1),
            torch.float32)
        get_raw_stream(0)
        triton_poi_fused_reflection_pad2d_0[grid(17424)](primals_1, buf0, 
            17424, XBLOCK=128, num_warps=4, num_stages=1)
        buf1 = extern_kernels.convolution(buf0, primals_2, stride=(1, 1),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf1, (4, 8, 64, 64), (32768, 4096, 64, 1))
        buf2 = empty_strided_cuda((4, 8, 66, 66), (34848, 4356, 66, 1),
            torch.float32)
        triton_poi_fused_convolution_leaky_relu_reflection_pad2d_1[grid(139392)
            ](buf1, primals_3, buf2, 139392, XBLOCK=512, num_warps=8,
            num_stages=1)
        buf3 = extern_kernels.convolution(buf2, primals_4, stride=(1, 1),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf3, (4, 8, 64, 64), (32768, 4096, 64, 1))
        buf4 = buf3
        del buf3
        triton_poi_fused_add_convolution_leaky_relu_2[grid(131072)](buf4,
            primals_5, primals_1, 131072, XBLOCK=1024, num_warps=4,
            num_stages=1)
        del primals_5
        buf5 = empty_strided_cuda((4, 8, 34, 34), (9248, 1156, 34, 1),
            torch.float32)
        triton_poi_fused_avg_pool2d_reflection_pad2d_3[grid(36992)](buf4,
            buf5, 36992, XBLOCK=256, num_warps=4, num_stages=1)
        buf6 = extern_kernels.convolution(buf5, primals_6, stride=(1, 1),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf6, (4, 16, 32, 32), (16384, 1024, 32, 1))
        buf7 = empty_strided_cuda((4, 16, 34, 34), (18496, 1156, 34, 1),
            torch.float32)
        triton_poi_fused_convolution_leaky_relu_reflection_pad2d_4[grid(73984)
            ](buf6, primals_7, buf7, 73984, XBLOCK=512, num_warps=8,
            num_stages=1)
        buf8 = extern_kernels.convolution(buf7, primals_8, stride=(1, 1),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf8, (4, 16, 32, 32), (16384, 1024, 32, 1))
        buf9 = buf8
        del buf8
        buf10 = buf9
        del buf9
        triton_poi_fused_add_avg_pool2d_convolution_leaky_relu_5[grid(65536)](
            buf10, primals_9, buf4, 65536, XBLOCK=256, num_warps=4,
            num_stages=1)
        del primals_9
        buf11 = empty_strided_cuda((4, 16, 18, 18), (5184, 324, 18, 1),
            torch.float32)
        triton_poi_fused_avg_pool2d_reflection_pad2d_6[grid(20736)](buf10,
            buf11, 20736, XBLOCK=256, num_warps=4, num_stages=1)
        buf12 = extern_kernels.convolution(buf11, primals_10, stride=(1, 1),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf12, (4, 32, 16, 16), (8192, 256, 16, 1))
        buf13 = empty_strided_cuda((4, 32, 18, 18), (10368, 324, 18, 1),
            torch.float32)
        triton_poi_fused_convolution_leaky_relu_reflection_pad2d_7[grid(41472)
            ](buf12, primals_11, buf13, 41472, XBLOCK=256, num_warps=4,
            num_stages=1)
        buf14 = extern_kernels.convolution(buf13, primals_12, stride=(1, 1),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf14, (4, 32, 16, 16), (8192, 256, 16, 1))
        buf15 = buf14
        del buf14
        buf16 = buf15
        del buf15
        triton_poi_fused_add_avg_pool2d_convolution_leaky_relu_8[grid(32768)](
            buf16, primals_13, buf10, 32768, XBLOCK=128, num_warps=4,
            num_stages=1)
        del primals_13
        buf17 = empty_strided_cuda((4, 32, 10, 10), (3200, 100, 10, 1),
            torch.float32)
        triton_poi_fused_avg_pool2d_reflection_pad2d_9[grid(12800)](buf16,
            buf17, 12800, XBLOCK=128, num_warps=4, num_stages=1)
        buf18 = extern_kernels.convolution(buf17, primals_14, stride=(1, 1),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf18, (4, 64, 8, 8), (4096, 64, 8, 1))
        buf19 = empty_strided_cuda((4, 64, 10, 10), (6400, 100, 10, 1),
            torch.float32)
        triton_poi_fused_convolution_leaky_relu_reflection_pad2d_10[grid(25600)
            ](buf18, primals_15, buf19, 25600, XBLOCK=256, num_warps=4,
            num_stages=1)
        buf20 = extern_kernels.convolution(buf19, primals_16, stride=(1, 1),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf20, (4, 64, 8, 8), (4096, 64, 8, 1))
        buf21 = buf20
        del buf20
        buf22 = buf21
        del buf21
        triton_poi_fused_add_avg_pool2d_convolution_leaky_relu_11[grid(16384)](
            buf22, primals_17, buf16, 16384, XBLOCK=256, num_warps=4,
            num_stages=1)
        del primals_17
        buf23 = empty_strided_cuda((4, 64, 6, 6), (2304, 36, 6, 1), torch.
            float32)
        triton_poi_fused_avg_pool2d_reflection_pad2d_12[grid(9216)](buf22,
            buf23, 9216, XBLOCK=128, num_warps=4, num_stages=1)
        buf24 = extern_kernels.convolution(buf23, primals_18, stride=(1, 1),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf24, (4, 64, 4, 4), (1024, 16, 4, 1))
        buf25 = empty_strided_cuda((4, 64, 6, 6), (2304, 36, 6, 1), torch.
            float32)
        triton_poi_fused_convolution_leaky_relu_reflection_pad2d_13[grid(9216)
            ](buf24, primals_19, buf25, 9216, XBLOCK=256, num_warps=4,
            num_stages=1)
        buf26 = extern_kernels.convolution(buf25, primals_20, stride=(1, 1),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf26, (4, 64, 4, 4), (1024, 16, 4, 1))
        buf27 = buf26
        del buf26
        buf100 = empty_strided_cuda((4, 64, 4, 4), (1024, 16, 4, 1), torch.bool
            )
        triton_poi_fused_add_avg_pool2d_convolution_leaky_relu_leaky_relu_backward_14[
            grid(4096)](buf27, primals_21, buf22, buf100, 4096, XBLOCK=128,
            num_warps=4, num_stages=1)
        del primals_21
        buf28 = empty_strided_cuda((8,), (1,), torch.int64)
        triton_poi_fused_arange_15[grid(8)](buf28, 8, XBLOCK=8, num_warps=1,
            num_stages=1)
        buf29 = empty_strided_cuda((8, 1), (1, 1), torch.int64)
        triton_poi_fused__to_copy_16[grid(8)](buf29, 8, XBLOCK=8, num_warps
            =1, num_stages=1)
        buf30 = empty_strided_cuda((8, 1), (1, 1), torch.int64)
        triton_poi_fused_add_clamp_17[grid(8)](buf30, 8, XBLOCK=8,
            num_warps=1, num_stages=1)
        buf31 = empty_strided_cuda((8,), (1,), torch.int64)
        triton_poi_fused__to_copy_16[grid(8)](buf31, 8, XBLOCK=8, num_warps
            =1, num_stages=1)
        buf32 = empty_strided_cuda((8,), (1,), torch.int64)
        triton_poi_fused_add_clamp_17[grid(8)](buf32, 8, XBLOCK=8,
            num_warps=1, num_stages=1)
        buf33 = empty_strided_cuda((8,), (1,), torch.float32)
        triton_poi_fused__to_copy_add_clamp_mul_sub_18[grid(8)](buf33, 8,
            XBLOCK=8, num_warps=1, num_stages=1)
        buf34 = empty_strided_cuda((4, 64, 8, 8), (4096, 64, 8, 1), torch.
            float32)
        triton_poi_fused__unsafe_index_add_leaky_relu_mul_sub_19[grid(16384)](
            buf29, buf31, buf27, buf32, buf33, buf34, 16384, XBLOCK=256,
            num_warps=4, num_stages=1)
        buf35 = empty_strided_cuda((8, 1), (1, 1), torch.float32)
        triton_poi_fused__to_copy_add_clamp_mul_sub_18[grid(8)](buf35, 8,
            XBLOCK=8, num_warps=1, num_stages=1)
        buf36 = empty_strided_cuda((4, 128, 8, 8), (8192, 64, 8, 1), torch.
            float32)
        triton_poi_fused_cat_20[grid(32768)](buf34, buf30, buf31, buf27,
            buf32, buf33, buf35, buf22, buf36, 32768, XBLOCK=256, num_warps
            =4, num_stages=1)
        del buf27
        del buf34
        buf37 = empty_strided_cuda((4, 128, 10, 10), (12800, 100, 10, 1),
            torch.float32)
        triton_poi_fused_reflection_pad2d_21[grid(51200)](buf36, buf37, 
            51200, XBLOCK=512, num_warps=4, num_stages=1)
        buf38 = extern_kernels.convolution(buf37, primals_22, stride=(1, 1),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf38, (4, 32, 8, 8), (2048, 64, 8, 1))
        buf39 = empty_strided_cuda((4, 32, 10, 10), (3200, 100, 10, 1),
            torch.float32)
        triton_poi_fused_convolution_leaky_relu_reflection_pad2d_22[grid(12800)
            ](buf38, primals_23, buf39, 12800, XBLOCK=256, num_warps=4,
            num_stages=1)
        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, 32, 8, 8), (2048, 64, 8, 1))
        buf41 = empty_strided_cuda((16,), (1,), torch.int64)
        triton_poi_fused_arange_23[grid(16)](buf41, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf42 = empty_strided_cuda((16, 1), (1, 1), torch.int64)
        triton_poi_fused__to_copy_24[grid(16)](buf42, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf43 = empty_strided_cuda((16, 1), (1, 1), torch.int64)
        triton_poi_fused_add_clamp_25[grid(16)](buf43, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf44 = empty_strided_cuda((16,), (1,), torch.int64)
        triton_poi_fused__to_copy_24[grid(16)](buf44, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf45 = empty_strided_cuda((16,), (1,), torch.int64)
        triton_poi_fused_add_clamp_25[grid(16)](buf45, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf48 = empty_strided_cuda((16,), (1,), torch.float32)
        triton_poi_fused__to_copy_add_clamp_mul_sub_26[grid(16)](buf48, 16,
            XBLOCK=16, num_warps=1, num_stages=1)
        buf50 = empty_strided_cuda((16, 1), (1, 1), torch.float32)
        triton_poi_fused__to_copy_add_clamp_mul_sub_26[grid(16)](buf50, 16,
            XBLOCK=16, num_warps=1, num_stages=1)
        buf47 = empty_strided_cuda((4, 32, 16, 16), (8192, 256, 16, 1),
            torch.float32)
        buf46 = empty_strided_cuda((4, 32, 16, 16), (8192, 256, 16, 1),
            torch.float32)
        buf49 = buf46
        del buf46
        buf51 = buf47
        del buf47
        triton_poi_fused__unsafe_index_add_convolution_leaky_relu_mul_sub_27[
            grid(32768)](buf49, buf51, buf43, buf44, buf40, primals_25,
            buf36, buf42, buf45, buf48, buf50, 32768, XBLOCK=256, num_warps
            =4, num_stages=1)
        buf52 = empty_strided_cuda((4, 64, 18, 18), (20736, 324, 18, 1),
            torch.float32)
        triton_poi_fused_cat_reflection_pad2d_28[grid(82944)](buf49, buf51,
            buf16, buf52, 82944, XBLOCK=512, num_warps=8, num_stages=1)
        buf53 = extern_kernels.convolution(buf52, primals_26, stride=(1, 1),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf53, (4, 16, 16, 16), (4096, 256, 16, 1))
        buf54 = empty_strided_cuda((4, 16, 18, 18), (5184, 324, 18, 1),
            torch.float32)
        triton_poi_fused_convolution_leaky_relu_reflection_pad2d_29[grid(20736)
            ](buf53, primals_27, buf54, 20736, XBLOCK=256, num_warps=4,
            num_stages=1)
        buf55 = extern_kernels.convolution(buf54, primals_28, stride=(1, 1),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf55, (4, 16, 16, 16), (4096, 256, 16, 1))
        buf56 = buf55
        del buf55
        buf96 = empty_strided_cuda((4, 16, 16, 16), (4096, 256, 16, 1),
            torch.bool)
        triton_poi_fused_add_convolution_leaky_relu_leaky_relu_backward_30[grid
            (16384)](buf56, primals_29, buf49, buf51, buf16, buf96, 16384,
            XBLOCK=256, num_warps=4, num_stages=1)
        del buf49
        del buf51
        del primals_29
        buf57 = empty_strided_cuda((32,), (1,), torch.int64)
        triton_poi_fused_arange_31[grid(32)](buf57, 32, XBLOCK=32,
            num_warps=1, num_stages=1)
        buf58 = empty_strided_cuda((32, 1), (1, 1), torch.int64)
        triton_poi_fused__to_copy_32[grid(32)](buf58, 32, XBLOCK=32,
            num_warps=1, num_stages=1)
        buf59 = empty_strided_cuda((32, 1), (1, 1), torch.int64)
        triton_poi_fused_add_clamp_33[grid(32)](buf59, 32, XBLOCK=32,
            num_warps=1, num_stages=1)
        buf60 = empty_strided_cuda((32,), (1,), torch.int64)
        triton_poi_fused__to_copy_32[grid(32)](buf60, 32, XBLOCK=32,
            num_warps=1, num_stages=1)
        buf61 = empty_strided_cuda((32,), (1,), torch.int64)
        triton_poi_fused_add_clamp_33[grid(32)](buf61, 32, XBLOCK=32,
            num_warps=1, num_stages=1)
        buf62 = empty_strided_cuda((32,), (1,), torch.float32)
        triton_poi_fused__to_copy_add_clamp_mul_sub_34[grid(32)](buf62, 32,
            XBLOCK=32, num_warps=1, num_stages=1)
        buf63 = empty_strided_cuda((4, 16, 32, 32), (16384, 1024, 32, 1),
            torch.float32)
        triton_poi_fused__unsafe_index_add_leaky_relu_mul_sub_35[grid(65536)](
            buf58, buf60, buf56, buf61, buf62, buf63, 65536, XBLOCK=512,
            num_warps=4, num_stages=1)
        buf64 = empty_strided_cuda((32, 1), (1, 1), torch.float32)
        triton_poi_fused__to_copy_add_clamp_mul_sub_34[grid(32)](buf64, 32,
            XBLOCK=32, num_warps=1, num_stages=1)
        buf65 = empty_strided_cuda((4, 32, 32, 32), (32768, 1024, 32, 1),
            torch.float32)
        triton_poi_fused_cat_36[grid(131072)](buf63, buf59, buf60, buf56,
            buf61, buf62, buf64, buf10, buf65, 131072, XBLOCK=512,
            num_warps=8, num_stages=1)
        del buf63
        buf66 = empty_strided_cuda((4, 32, 34, 34), (36992, 1156, 34, 1),
            torch.float32)
        triton_poi_fused_reflection_pad2d_37[grid(147968)](buf65, buf66, 
            147968, XBLOCK=512, num_warps=8, num_stages=1)
        buf67 = extern_kernels.convolution(buf66, primals_30, stride=(1, 1),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf67, (4, 8, 32, 32), (8192, 1024, 32, 1))
        buf68 = empty_strided_cuda((4, 8, 34, 34), (9248, 1156, 34, 1),
            torch.float32)
        triton_poi_fused_convolution_leaky_relu_reflection_pad2d_38[grid(36992)
            ](buf67, primals_31, buf68, 36992, XBLOCK=512, num_warps=4,
            num_stages=1)
        buf69 = extern_kernels.convolution(buf68, primals_32, stride=(1, 1),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf69, (4, 8, 32, 32), (8192, 1024, 32, 1))
        buf70 = empty_strided_cuda((64,), (1,), torch.int64)
        triton_poi_fused_arange_39[grid(64)](buf70, 64, XBLOCK=64,
            num_warps=1, num_stages=1)
        buf71 = empty_strided_cuda((64, 1), (1, 1), torch.int64)
        triton_poi_fused__to_copy_40[grid(64)](buf71, 64, XBLOCK=64,
            num_warps=1, num_stages=1)
        buf72 = empty_strided_cuda((64, 1), (1, 1), torch.int64)
        triton_poi_fused_add_clamp_41[grid(64)](buf72, 64, XBLOCK=64,
            num_warps=1, num_stages=1)
        buf73 = empty_strided_cuda((64,), (1,), torch.int64)
        triton_poi_fused__to_copy_40[grid(64)](buf73, 64, XBLOCK=64,
            num_warps=1, num_stages=1)
        buf74 = empty_strided_cuda((64,), (1,), torch.int64)
        triton_poi_fused_add_clamp_41[grid(64)](buf74, 64, XBLOCK=64,
            num_warps=1, num_stages=1)
        buf77 = empty_strided_cuda((64,), (1,), torch.float32)
        triton_poi_fused__to_copy_add_clamp_mul_sub_42[grid(64)](buf77, 64,
            XBLOCK=64, num_warps=1, num_stages=1)
        buf79 = empty_strided_cuda((64, 1), (1, 1), torch.float32)
        triton_poi_fused__to_copy_add_clamp_mul_sub_42[grid(64)](buf79, 64,
            XBLOCK=64, num_warps=1, num_stages=1)
        buf76 = empty_strided_cuda((4, 8, 64, 64), (32768, 4096, 64, 1),
            torch.float32)
        buf75 = empty_strided_cuda((4, 8, 64, 64), (32768, 4096, 64, 1),
            torch.float32)
        buf78 = buf75
        del buf75
        buf80 = buf76
        del buf76
        triton_poi_fused__unsafe_index_add_convolution_leaky_relu_mul_sub_43[
            grid(131072)](buf78, buf80, buf72, buf73, buf69, primals_33,
            buf65, buf71, buf74, buf77, buf79, 131072, XBLOCK=512,
            num_warps=8, num_stages=1)
        buf81 = empty_strided_cuda((4, 16, 66, 66), (69696, 4356, 66, 1),
            torch.float32)
        triton_poi_fused_cat_reflection_pad2d_44[grid(278784)](buf78, buf80,
            buf4, buf81, 278784, XBLOCK=512, num_warps=8, num_stages=1)
        buf82 = extern_kernels.convolution(buf81, primals_34, stride=(1, 1),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf82, (4, 1, 64, 64), (4096, 4096, 64, 1))
        buf83 = empty_strided_cuda((4, 1, 66, 66), (4356, 4356, 66, 1),
            torch.float32)
        triton_poi_fused_convolution_leaky_relu_reflection_pad2d_45[grid(17424)
            ](buf82, primals_35, buf83, 17424, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf84 = extern_kernels.convolution(buf83, primals_36, stride=(1, 1),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf84, (4, 1, 64, 64), (4096, 4096, 64, 1))
        buf86 = extern_kernels.convolution(buf0, primals_38, stride=(1, 1),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf86, (4, 1, 64, 64), (4096, 4096, 64, 1))
        buf87 = empty_strided_cuda((4, 1, 66, 66), (4356, 4356, 66, 1),
            torch.float32)
        triton_poi_fused_convolution_leaky_relu_reflection_pad2d_45[grid(17424)
            ](buf86, primals_39, buf87, 17424, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf88 = extern_kernels.convolution(buf87, primals_40, stride=(1, 1),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf88, (4, 1, 64, 64), (4096, 4096, 64, 1))
        buf85 = reinterpret_tensor(buf84, (4, 1, 64, 64), (4096, 16384, 64,
            1), 0)
        del buf84
        buf89 = reinterpret_tensor(buf56, (4, 1, 64, 64), (4096, 4096, 64, 
            1), 0)
        del buf56
        buf90 = empty_strided_cuda((4, 1, 64, 64), (4096, 4096, 64, 1),
            torch.bool)
        buf92 = empty_strided_cuda((4, 1, 64, 64), (4096, 4096, 64, 1),
            torch.bool)
        triton_poi_fused_add_convolution_leaky_relu_leaky_relu_backward_46[grid
            (16384)](buf85, primals_37, buf78, buf80, buf4, buf88,
            primals_41, primals_1, buf89, buf90, buf92, 16384, XBLOCK=256,
            num_warps=4, num_stages=1)
        del buf78
        del buf80
        del buf85
        del buf88
        del primals_1
        del primals_37
        del primals_41
        buf91 = empty_strided_cuda((4, 1, 64, 64), (4096, 4096, 64, 1),
            torch.bool)
        triton_poi_fused_convolution_leaky_relu_leaky_relu_backward_47[grid
            (16384)](buf86, primals_39, buf91, 16384, XBLOCK=256, num_warps
            =4, num_stages=1)
        del buf86
        del primals_39
        buf93 = empty_strided_cuda((4, 1, 64, 64), (4096, 4096, 64, 1),
            torch.bool)
        triton_poi_fused_convolution_leaky_relu_leaky_relu_backward_47[grid
            (16384)](buf82, primals_35, buf93, 16384, XBLOCK=256, num_warps
            =4, num_stages=1)
        del buf82
        del primals_35
        buf94 = empty_strided_cuda((4, 8, 32, 32), (8192, 1024, 32, 1),
            torch.bool)
        triton_poi_fused_add_convolution_leaky_relu_leaky_relu_backward_48[grid
            (32768)](buf69, primals_33, buf65, buf94, 32768, XBLOCK=256,
            num_warps=4, num_stages=1)
        del buf65
        del buf69
        del primals_33
        buf95 = empty_strided_cuda((4, 8, 32, 32), (8192, 1024, 32, 1),
            torch.bool)
        triton_poi_fused_convolution_leaky_relu_leaky_relu_backward_49[grid
            (32768)](buf67, primals_31, buf95, 32768, XBLOCK=128, num_warps
            =4, num_stages=1)
        del buf67
        del primals_31
        buf97 = empty_strided_cuda((4, 16, 16, 16), (4096, 256, 16, 1),
            torch.bool)
        triton_poi_fused_convolution_leaky_relu_leaky_relu_backward_50[grid
            (16384)](buf53, primals_27, buf97, 16384, XBLOCK=256, num_warps
            =4, num_stages=1)
        del buf53
        del primals_27
        buf98 = empty_strided_cuda((4, 32, 8, 8), (2048, 64, 8, 1), torch.bool)
        triton_poi_fused_add_convolution_leaky_relu_leaky_relu_backward_51[grid
            (8192)](buf40, primals_25, buf36, buf98, 8192, XBLOCK=128,
            num_warps=4, num_stages=1)
        del buf36
        del buf40
        del primals_25
        buf99 = empty_strided_cuda((4, 32, 8, 8), (2048, 64, 8, 1), torch.bool)
        triton_poi_fused_convolution_leaky_relu_leaky_relu_backward_52[grid
            (8192)](buf38, primals_23, buf99, 8192, XBLOCK=256, num_warps=4,
            num_stages=1)
        del buf38
        del primals_23
        buf101 = empty_strided_cuda((4, 64, 4, 4), (1024, 16, 4, 1), torch.bool
            )
        triton_poi_fused_convolution_leaky_relu_leaky_relu_backward_53[grid
            (4096)](buf24, primals_19, buf101, 4096, XBLOCK=128, num_warps=
            4, num_stages=1)
        del buf24
        del primals_19
        buf102 = empty_strided_cuda((4, 64, 8, 8), (4096, 64, 8, 1), torch.bool
            )
        triton_poi_fused_convolution_leaky_relu_leaky_relu_backward_54[grid
            (16384)](buf18, primals_15, buf102, 16384, XBLOCK=256,
            num_warps=4, num_stages=1)
        del buf18
        del primals_15
        buf103 = empty_strided_cuda((4, 32, 16, 16), (8192, 256, 16, 1),
            torch.bool)
        triton_poi_fused_convolution_leaky_relu_leaky_relu_backward_55[grid
            (32768)](buf12, primals_11, buf103, 32768, XBLOCK=256,
            num_warps=4, num_stages=1)
        del buf12
        del primals_11
        buf104 = empty_strided_cuda((4, 16, 32, 32), (16384, 1024, 32, 1),
            torch.bool)
        triton_poi_fused_convolution_leaky_relu_leaky_relu_backward_56[grid
            (65536)](buf6, primals_7, buf104, 65536, XBLOCK=256, num_warps=
            4, num_stages=1)
        del buf6
        del primals_7
        buf105 = empty_strided_cuda((4, 8, 64, 64), (32768, 4096, 64, 1),
            torch.bool)
        triton_poi_fused_convolution_leaky_relu_leaky_relu_backward_57[grid
            (131072)](buf1, primals_3, buf105, 131072, XBLOCK=512,
            num_warps=8, num_stages=1)
        del buf1
        del primals_3
    return (buf89, primals_2, primals_4, primals_6, primals_8, primals_10,
        primals_12, primals_14, primals_16, primals_18, primals_20,
        primals_22, primals_24, primals_26, primals_28, primals_30,
        primals_32, primals_34, primals_36, primals_38, primals_40, buf0,
        buf2, buf4, buf5, buf7, buf10, buf11, buf13, buf16, buf17, buf19,
        buf22, buf23, buf25, buf28, buf29, buf30, buf31, buf32, buf33,
        buf35, buf37, buf39, buf41, buf42, buf43, buf44, buf45, buf48,
        buf50, buf52, buf54, buf57, buf58, buf59, buf60, buf61, buf62,
        buf64, buf66, buf68, buf70, buf71, buf72, buf73, buf74, buf77,
        buf79, buf81, buf83, buf87, buf90, buf91, buf92, buf93, buf94,
        buf95, buf96, buf97, buf98, buf99, buf100, buf101, buf102, buf103,
        buf104, buf105)


class ConvBlock(nn.Module):

    def __init__(self, in_channels, out_channels, dropout=False, norm=None,
        residual=True, activation='leakyrelu', in_place_activation=True,
        transpose=False, reflectpad=True):
        super(ConvBlock, self).__init__()
        self.dropout = dropout
        self.residual = residual
        self.activation = activation
        self.transpose = transpose
        self.reflectpad = reflectpad
        if self.dropout:
            self.dropout1 = nn.Dropout2d(p=0.05)
            self.dropout2 = nn.Dropout2d(p=0.05)
        self.norm1 = None
        self.norm2 = None
        if norm is not None:
            if norm == 'batch':
                self.norm1 = nn.BatchNorm2d(out_channels)
                self.norm2 = nn.BatchNorm2d(out_channels)
            elif norm == 'instance':
                self.norm1 = nn.InstanceNorm2d(out_channels, affine=True)
                self.norm2 = nn.InstanceNorm2d(out_channels, affine=True)
        if self.transpose:
            self.conv1 = nn.ConvTranspose2d(in_channels, out_channels,
                kernel_size=3, padding=0 if self.reflectpad else 1)
            self.conv2 = nn.ConvTranspose2d(out_channels, out_channels,
                kernel_size=3, padding=0 if self.reflectpad else 1)
        else:
            self.conv1 = nn.Conv2d(in_channels, out_channels, kernel_size=3,
                padding=0 if self.reflectpad else 1)
            self.conv2 = nn.Conv2d(out_channels, out_channels, kernel_size=
                3, padding=0 if self.reflectpad else 1)
        if self.activation == 'relu':
            self.actfun1 = nn.ReLU(inplace=in_place_activation)
            self.actfun2 = nn.ReLU(inplace=in_place_activation)
        elif self.activation == 'leakyrelu':
            self.actfun1 = nn.LeakyReLU(inplace=in_place_activation)
            self.actfun2 = nn.LeakyReLU(inplace=in_place_activation)
        elif self.activation == 'elu':
            self.actfun1 = nn.ELU(inplace=in_place_activation)
            self.actfun2 = nn.ELU(inplace=in_place_activation)
        elif self.activation == 'selu':
            self.actfun1 = nn.SELU(inplace=in_place_activation)
            self.actfun2 = nn.SELU(inplace=in_place_activation)
        if self.reflectpad:
            self.rpad1 = nn.ReflectionPad2d(1)
            self.rpad2 = nn.ReflectionPad2d(1)

    def forward(self, x):
        ox = x
        if self.reflectpad:
            x = self.rpad1(x)
        x = self.conv1(x)
        if self.dropout:
            x = self.dropout1(x)
        x = self.actfun1(x)
        if self.norm1:
            x = self.norm1(x)
        if self.reflectpad:
            x = self.rpad2(x)
        x = self.conv2(x)
        if self.dropout:
            x = self.dropout2(x)
        if self.residual:
            x[:, 0:min(ox.shape[1], x.shape[1]), :, :] += ox[:, 0:min(ox.
                shape[1], x.shape[1]), :, :]
        x = self.actfun2(x)
        if self.norm2:
            x = self.norm2(x)
        return x


class UnetNew(nn.Module):

    def __init__(self, n_channel_in=1, n_channel_out=1, n_internal_channels
        =8, residual=True, down='avgpool', up='bilinear', activation=
        'leakyrelu', norm=None, softmax=False):
        super(UnetNew, self).__init__()
        self.residual = residual
        self.softmax = softmax
        nic = n_internal_channels
        if down == 'maxpool':
            self.down1 = nn.MaxPool2d(kernel_size=2)
            self.down2 = nn.MaxPool2d(kernel_size=2)
            self.down3 = nn.MaxPool2d(kernel_size=2)
            self.down4 = nn.MaxPool2d(kernel_size=2)
        elif down == 'avgpool':
            self.down1 = nn.AvgPool2d(kernel_size=2)
            self.down2 = nn.AvgPool2d(kernel_size=2)
            self.down3 = nn.AvgPool2d(kernel_size=2)
            self.down4 = nn.AvgPool2d(kernel_size=2)
        elif down == 'convpool':
            self.down1 = nn.Conv2d(nic, nic, kernel_size=2, stride=2, groups=32
                )
            self.down2 = nn.Conv2d(nic * 2, nic * 2, kernel_size=2, stride=
                2, groups=64)
            self.down3 = nn.Conv2d(nic * 4, nic * 4, kernel_size=2, stride=
                2, groups=128)
            self.down4 = nn.Conv2d(nic * 8, nic * 8, kernel_size=2, stride=
                2, groups=256)
            self.down1.weight.data = 0.01 * self.down1.weight.data + 0.25
            self.down2.weight.data = 0.01 * self.down2.weight.data + 0.25
            self.down3.weight.data = 0.01 * self.down3.weight.data + 0.25
            self.down4.weight.data = 0.01 * self.down4.weight.data + 0.25
            self.down1.bias.data = 0.01 * self.down1.bias.data + 0
            self.down2.bias.data = 0.01 * self.down2.bias.data + 0
            self.down3.bias.data = 0.01 * self.down3.bias.data + 0
            self.down4.bias.data = 0.01 * self.down4.bias.data + 0
        if up == 'bilinear' or up == 'nearest':
            self.up1 = lambda x: nn.functional.interpolate(x, mode=up,
                scale_factor=2, align_corners=False)
            self.up2 = lambda x: nn.functional.interpolate(x, mode=up,
                scale_factor=2, align_corners=False)
            self.up3 = lambda x: nn.functional.interpolate(x, mode=up,
                scale_factor=2, align_corners=False)
            self.up4 = lambda x: nn.functional.interpolate(x, mode=up,
                scale_factor=2, align_corners=False)
        elif up == 'tconv':
            self.up1 = nn.ConvTranspose2d(nic * 8, nic * 8, kernel_size=2,
                stride=2, groups=nic * 8)
            self.up2 = nn.ConvTranspose2d(nic * 4, nic * 4, kernel_size=2,
                stride=2, groups=nic * 4)
            self.up3 = nn.ConvTranspose2d(nic * 2, nic * 2, kernel_size=2,
                stride=2, groups=nic * 2)
            self.up4 = nn.ConvTranspose2d(nic, nic, kernel_size=2, stride=2,
                groups=nic)
            self.up1.weight.data = 0.01 * self.up1.weight.data + 0.25
            self.up2.weight.data = 0.01 * self.up2.weight.data + 0.25
            self.up3.weight.data = 0.01 * self.up3.weight.data + 0.25
            self.up4.weight.data = 0.01 * self.up4.weight.data + 0.25
            self.up1.bias.data = 0.01 * self.up1.bias.data + 0
            self.up2.bias.data = 0.01 * self.up2.bias.data + 0
            self.up3.bias.data = 0.01 * self.up3.bias.data + 0
            self.up4.bias.data = 0.01 * self.up4.bias.data + 0
        self.conv1 = ConvBlock(n_channel_in, nic, residual=residual,
            activation=activation, norm=norm)
        self.conv2 = ConvBlock(nic, nic * 2, residual=residual, activation=
            activation, norm=norm)
        self.conv3 = ConvBlock(nic * 2, nic * 4, residual=residual,
            activation=activation, norm=norm)
        self.conv4 = ConvBlock(nic * 4, nic * 8, residual=residual,
            activation=activation, norm=norm)
        self.conv5 = ConvBlock(nic * 8, nic * 8, residual=residual,
            activation=activation, norm=norm)
        self.conv6 = ConvBlock(2 * nic * 8, nic * 4, residual=residual,
            activation=activation, norm=norm)
        self.conv7 = ConvBlock(2 * nic * 4, nic * 2, residual=residual,
            activation=activation, norm=norm)
        self.conv8 = ConvBlock(2 * nic * 2, nic, residual=residual,
            activation=activation, norm=norm)
        self.conv9 = ConvBlock(2 * nic, n_channel_out, residual=residual,
            activation=activation, norm=norm)
        if self.residual:
            self.convres = ConvBlock(n_channel_in, n_channel_out, residual=
                residual, activation=activation, norm=norm)

    def forward(self, input_0):
        primals_2 = self.conv1.conv1.weight
        primals_3 = self.conv1.conv1.bias
        primals_4 = self.conv1.conv2.weight
        primals_5 = self.conv1.conv2.bias
        primals_6 = self.conv2.conv1.weight
        primals_7 = self.conv2.conv1.bias
        primals_8 = self.conv2.conv2.weight
        primals_9 = self.conv2.conv2.bias
        primals_10 = self.conv3.conv1.weight
        primals_11 = self.conv3.conv1.bias
        primals_12 = self.conv3.conv2.weight
        primals_13 = self.conv3.conv2.bias
        primals_14 = self.conv4.conv1.weight
        primals_15 = self.conv4.conv1.bias
        primals_16 = self.conv4.conv2.weight
        primals_17 = self.conv4.conv2.bias
        primals_18 = self.conv5.conv1.weight
        primals_19 = self.conv5.conv1.bias
        primals_20 = self.conv5.conv2.weight
        primals_21 = self.conv5.conv2.bias
        primals_22 = self.conv6.conv1.weight
        primals_23 = self.conv6.conv1.bias
        primals_24 = self.conv6.conv2.weight
        primals_25 = self.conv6.conv2.bias
        primals_26 = self.conv7.conv1.weight
        primals_27 = self.conv7.conv1.bias
        primals_28 = self.conv7.conv2.weight
        primals_29 = self.conv7.conv2.bias
        primals_30 = self.conv8.conv1.weight
        primals_31 = self.conv8.conv1.bias
        primals_32 = self.conv8.conv2.weight
        primals_33 = self.conv8.conv2.bias
        primals_34 = self.conv9.conv1.weight
        primals_35 = self.conv9.conv1.bias
        primals_36 = self.conv9.conv2.weight
        primals_37 = self.conv9.conv2.bias
        primals_38 = self.convres.conv1.weight
        primals_39 = self.convres.conv1.bias
        primals_40 = self.convres.conv2.weight
        primals_41 = self.convres.conv2.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, primals_34,
            primals_35, primals_36, primals_37, primals_38, primals_39,
            primals_40, primals_41])
        return output[0]


Measured latency_ms: 0.071354