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
import torch.utils.data
import torch.nn as 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_convolution_0(in_out_ptr0, in_ptr0, xnumel, XBLOCK: tl
    .constexpr):
    xnumel = 128
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x3 = xindex
    x1 = xindex // 4 % 8
    tmp0 = tl.load(in_out_ptr0 + x3, xmask)
    tmp1 = tl.load(in_ptr0 + x1, xmask, eviction_policy='evict_last')
    tmp2 = tmp0 + tmp1
    tl.store(in_out_ptr0 + x3, tmp2, xmask)


@triton.jit
def triton_poi_fused_convolution_relu_1(in_out_ptr0, in_ptr0, xnumel,
    XBLOCK: tl.constexpr):
    xnumel = 64
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x3 = xindex
    x1 = xindex // 4 % 4
    tmp0 = tl.load(in_out_ptr0 + x3, xmask)
    tmp1 = tl.load(in_ptr0 + x1, xmask, eviction_policy='evict_last')
    tmp2 = tmp0 + tmp1
    tmp3 = tl.full([1], 0, tl.int32)
    tmp4 = triton_helpers.maximum(tmp3, tmp2)
    tl.store(in_out_ptr0 + x3, tmp4, xmask)


@triton.jit
def triton_poi_fused_add_convolution_max_relu_2(in_ptr0, in_ptr1, in_ptr2,
    in_ptr3, out_ptr0, out_ptr1, xnumel, XBLOCK: tl.constexpr):
    xnumel = 16
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x2 = xindex
    x0 = xindex % 4
    tmp0 = tl.load(in_ptr0 + 4 * x2, xmask, eviction_policy='evict_last')
    tmp1 = tl.load(in_ptr1 + x0, xmask, eviction_policy='evict_last')
    tmp3 = tl.load(in_ptr2 + 4 * x2, xmask, eviction_policy='evict_last')
    tmp4 = tl.load(in_ptr3 + x0, xmask, eviction_policy='evict_last')
    tmp9 = tl.load(in_ptr0 + (1 + 4 * x2), xmask, eviction_policy='evict_last')
    tmp11 = tl.load(in_ptr2 + (1 + 4 * x2), xmask, eviction_policy='evict_last'
        )
    tmp16 = tl.load(in_ptr0 + (2 + 4 * x2), xmask, eviction_policy='evict_last'
        )
    tmp18 = tl.load(in_ptr2 + (2 + 4 * x2), xmask, eviction_policy='evict_last'
        )
    tmp23 = tl.load(in_ptr0 + (3 + 4 * x2), xmask, eviction_policy='evict_last'
        )
    tmp25 = tl.load(in_ptr2 + (3 + 4 * x2), xmask, eviction_policy='evict_last'
        )
    tmp2 = tmp0 + tmp1
    tmp5 = tmp3 + tmp4
    tmp6 = tmp2 + tmp5
    tmp7 = tl.full([1], 0, tl.int32)
    tmp8 = triton_helpers.maximum(tmp7, tmp6)
    tmp10 = tmp9 + tmp1
    tmp12 = tmp11 + tmp4
    tmp13 = tmp10 + tmp12
    tmp14 = triton_helpers.maximum(tmp7, tmp13)
    tmp15 = triton_helpers.maximum(tmp8, tmp14)
    tmp17 = tmp16 + tmp1
    tmp19 = tmp18 + tmp4
    tmp20 = tmp17 + tmp19
    tmp21 = triton_helpers.maximum(tmp7, tmp20)
    tmp22 = triton_helpers.maximum(tmp15, tmp21)
    tmp24 = tmp23 + tmp1
    tmp26 = tmp25 + tmp4
    tmp27 = tmp24 + tmp26
    tmp28 = triton_helpers.maximum(tmp7, tmp27)
    tmp29 = triton_helpers.maximum(tmp22, tmp28)
    tmp30 = tmp8 > tmp14
    tmp31 = tmp8 == tmp14
    tmp32 = tmp8 != tmp8
    tmp33 = tmp14 != tmp14
    tmp34 = tmp32 > tmp33
    tmp35 = tmp30 | tmp34
    tmp36 = tmp32 & tmp33
    tmp37 = tmp31 | tmp36
    tmp38 = tl.full([1], 0, tl.int64)
    tmp39 = tl.full([1], 1, tl.int64)
    tmp40 = tmp38 < tmp39
    tmp41 = tmp37 & tmp40
    tmp42 = tmp35 | tmp41
    tmp43 = tl.where(tmp42, tmp8, tmp14)
    tmp44 = tl.where(tmp42, tmp38, tmp39)
    tmp45 = tmp43 > tmp21
    tmp46 = tmp43 == tmp21
    tmp47 = tmp43 != tmp43
    tmp48 = tmp21 != tmp21
    tmp49 = tmp47 > tmp48
    tmp50 = tmp45 | tmp49
    tmp51 = tmp47 & tmp48
    tmp52 = tmp46 | tmp51
    tmp53 = tl.full([1], 2, tl.int64)
    tmp54 = tmp44 < tmp53
    tmp55 = tmp52 & tmp54
    tmp56 = tmp50 | tmp55
    tmp57 = tl.where(tmp56, tmp43, tmp21)
    tmp58 = tl.where(tmp56, tmp44, tmp53)
    tmp59 = tmp57 > tmp28
    tmp60 = tmp57 == tmp28
    tmp61 = tmp57 != tmp57
    tmp62 = tmp28 != tmp28
    tmp63 = tmp61 > tmp62
    tmp64 = tmp59 | tmp63
    tmp65 = tmp61 & tmp62
    tmp66 = tmp60 | tmp65
    tmp67 = tl.full([1], 3, tl.int64)
    tmp68 = tmp58 < tmp67
    tmp69 = tmp66 & tmp68
    tmp70 = tmp64 | tmp69
    tl.where(tmp70, tmp57, tmp28)
    tmp72 = tl.where(tmp70, tmp58, tmp67)
    tl.store(out_ptr0 + x2, tmp29, xmask)
    tl.store(out_ptr1 + x2, tmp72, xmask)


@triton.jit
def triton_poi_fused_cat_3(in_ptr0, in_ptr1, in_ptr2, in_ptr3, in_ptr4,
    out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 128
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x1 = xindex // 4 % 8
    x0 = xindex % 4
    x2 = xindex // 32
    x3 = xindex
    tmp0 = x1
    tl.full([1], 0, tl.int64)
    tmp3 = tl.full([1], 4, tl.int64)
    tmp4 = tmp0 < tmp3
    tmp5 = tl.load(in_ptr0 + (x0 + 4 * x1 + 16 * x2), tmp4 & xmask, other=0.0)
    tmp6 = tl.load(in_ptr1 + x1, tmp4 & xmask, eviction_policy='evict_last',
        other=0.0)
    tmp7 = tmp5 + tmp6
    tmp8 = tl.load(in_ptr2 + (x0 + 4 * x1 + 16 * x2), tmp4 & xmask, other=0.0)
    tmp9 = tl.load(in_ptr3 + x1, tmp4 & xmask, eviction_policy='evict_last',
        other=0.0)
    tmp10 = tmp8 + tmp9
    tmp11 = tmp7 + tmp10
    tmp12 = tl.full([1], 0, tl.int32)
    tmp13 = triton_helpers.maximum(tmp12, tmp11)
    tmp14 = tl.full(tmp13.shape, 0.0, tmp13.dtype)
    tmp15 = tl.where(tmp4, tmp13, tmp14)
    tmp16 = tmp0 >= tmp3
    tl.full([1], 8, tl.int64)
    tmp19 = tl.load(in_ptr4 + (4 * x2 + (-4 + x1)), tmp16 & xmask,
        eviction_policy='evict_last', other=0.0)
    tmp20 = tl.where(tmp4, tmp15, tmp19)
    tl.store(out_ptr0 + x3, tmp20, xmask)


@triton.jit
def triton_poi_fused_add_convolution_relu_threshold_backward_4(in_ptr0,
    in_ptr1, in_ptr2, in_ptr3, out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 64
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x3 = xindex
    x1 = xindex // 4 % 4
    tmp0 = tl.load(in_ptr0 + x3, xmask)
    tmp1 = tl.load(in_ptr1 + x1, xmask, eviction_policy='evict_last')
    tmp3 = tl.load(in_ptr2 + x3, xmask)
    tmp4 = tl.load(in_ptr3 + x1, xmask, eviction_policy='evict_last')
    tmp2 = tmp0 + tmp1
    tmp5 = tmp3 + tmp4
    tmp6 = tmp2 + tmp5
    tmp7 = tl.full([1], 0, tl.int32)
    tmp8 = triton_helpers.maximum(tmp7, tmp6)
    tmp9 = 0.0
    tmp10 = tmp8 <= tmp9
    tl.store(out_ptr0 + x3, tmp10, xmask)


def call(args):
    (primals_1, primals_2, primals_3, primals_4, primals_5, primals_6,
        primals_7, primals_8, primals_9, primals_10, primals_11, primals_12,
        primals_13, primals_14, primals_15, primals_16, primals_17,
        primals_18, primals_19, primals_20, primals_21, primals_22,
        primals_23, primals_24, primals_25, primals_26, primals_27,
        primals_28, primals_29, primals_30, primals_31, primals_32,
        primals_33, primals_34, primals_35) = args
    args.clear()
    assert_size_stride(primals_1, (8, 4, 1), (4, 1, 1))
    assert_size_stride(primals_2, (8,), (1,))
    assert_size_stride(primals_3, (4, 4, 4), (16, 4, 1))
    assert_size_stride(primals_4, (4, 8, 1), (8, 1, 1))
    assert_size_stride(primals_5, (4,), (1,))
    assert_size_stride(primals_6, (4, 8, 1), (8, 1, 1))
    assert_size_stride(primals_7, (4,), (1,))
    assert_size_stride(primals_8, (4, 4, 1), (4, 1, 1))
    assert_size_stride(primals_9, (4,), (1,))
    assert_size_stride(primals_10, (4, 8, 1), (8, 1, 1))
    assert_size_stride(primals_11, (4,), (1,))
    assert_size_stride(primals_12, (4, 8, 1), (8, 1, 1))
    assert_size_stride(primals_13, (4,), (1,))
    assert_size_stride(primals_14, (4, 4, 1), (4, 1, 1))
    assert_size_stride(primals_15, (4,), (1,))
    assert_size_stride(primals_16, (4, 8, 1), (8, 1, 1))
    assert_size_stride(primals_17, (4,), (1,))
    assert_size_stride(primals_18, (4, 8, 1), (8, 1, 1))
    assert_size_stride(primals_19, (4,), (1,))
    assert_size_stride(primals_20, (4, 4, 1), (4, 1, 1))
    assert_size_stride(primals_21, (4,), (1,))
    assert_size_stride(primals_22, (4, 8, 1), (8, 1, 1))
    assert_size_stride(primals_23, (4,), (1,))
    assert_size_stride(primals_24, (4, 8, 1), (8, 1, 1))
    assert_size_stride(primals_25, (4,), (1,))
    assert_size_stride(primals_26, (4, 4, 1), (4, 1, 1))
    assert_size_stride(primals_27, (4,), (1,))
    assert_size_stride(primals_28, (4, 8, 1), (8, 1, 1))
    assert_size_stride(primals_29, (4,), (1,))
    assert_size_stride(primals_30, (4, 8, 1), (8, 1, 1))
    assert_size_stride(primals_31, (4,), (1,))
    assert_size_stride(primals_32, (4, 4, 1), (4, 1, 1))
    assert_size_stride(primals_33, (4,), (1,))
    assert_size_stride(primals_34, (4, 4), (4, 1))
    assert_size_stride(primals_35, (4,), (1,))
    with torch.cuda._DeviceGuard(0):
        torch.cuda.set_device(0)
        buf0 = extern_kernels.convolution(primals_3, primals_1, stride=(1,),
            padding=(0,), dilation=(1,), transposed=False, output_padding=(
            0,), groups=1, bias=None)
        assert_size_stride(buf0, (4, 8, 4), (32, 4, 1))
        buf1 = buf0
        del buf0
        get_raw_stream(0)
        triton_poi_fused_convolution_0[grid(128)](buf1, primals_2, 128,
            XBLOCK=128, num_warps=4, num_stages=1)
        del primals_2
        buf2 = extern_kernels.convolution(buf1, primals_4, stride=(1,),
            padding=(0,), dilation=(1,), transposed=False, output_padding=(
            0,), groups=1, bias=None)
        assert_size_stride(buf2, (4, 4, 4), (16, 4, 1))
        buf3 = extern_kernels.convolution(buf1, primals_6, stride=(1,),
            padding=(0,), dilation=(1,), transposed=False, output_padding=(
            0,), groups=1, bias=None)
        assert_size_stride(buf3, (4, 4, 4), (16, 4, 1))
        buf4 = buf3
        del buf3
        triton_poi_fused_convolution_relu_1[grid(64)](buf4, primals_7, 64,
            XBLOCK=64, num_warps=1, num_stages=1)
        del primals_7
        buf5 = extern_kernels.convolution(buf4, primals_8, stride=(1,),
            padding=(0,), dilation=(1,), transposed=False, output_padding=(
            0,), groups=1, bias=None)
        assert_size_stride(buf5, (4, 4, 4), (16, 4, 1))
        buf6 = empty_strided_cuda((4, 4, 1), (4, 1, 16), torch.float32)
        buf7 = empty_strided_cuda((4, 4, 1), (4, 1, 1), torch.int64)
        triton_poi_fused_add_convolution_max_relu_2[grid(16)](buf5,
            primals_9, buf2, primals_5, buf6, buf7, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf8 = empty_strided_cuda((4, 8, 4), (32, 4, 1), torch.float32)
        triton_poi_fused_cat_3[grid(128)](buf5, primals_9, buf2, primals_5,
            buf6, buf8, 128, XBLOCK=128, num_warps=4, num_stages=1)
        buf9 = extern_kernels.convolution(buf8, primals_10, stride=(1,),
            padding=(0,), dilation=(1,), transposed=False, output_padding=(
            0,), groups=1, bias=None)
        assert_size_stride(buf9, (4, 4, 4), (16, 4, 1))
        buf10 = extern_kernels.convolution(buf8, primals_12, stride=(1,),
            padding=(0,), dilation=(1,), transposed=False, output_padding=(
            0,), groups=1, bias=None)
        assert_size_stride(buf10, (4, 4, 4), (16, 4, 1))
        buf11 = buf10
        del buf10
        triton_poi_fused_convolution_relu_1[grid(64)](buf11, primals_13, 64,
            XBLOCK=64, num_warps=1, num_stages=1)
        del primals_13
        buf12 = extern_kernels.convolution(buf11, primals_14, stride=(1,),
            padding=(0,), dilation=(1,), transposed=False, output_padding=(
            0,), groups=1, bias=None)
        assert_size_stride(buf12, (4, 4, 4), (16, 4, 1))
        buf13 = buf6
        del buf6
        buf14 = empty_strided_cuda((4, 4, 1), (4, 1, 1), torch.int64)
        triton_poi_fused_add_convolution_max_relu_2[grid(16)](buf12,
            primals_15, buf9, primals_11, buf13, buf14, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf15 = empty_strided_cuda((4, 8, 4), (32, 4, 1), torch.float32)
        triton_poi_fused_cat_3[grid(128)](buf12, primals_15, buf9,
            primals_11, buf13, buf15, 128, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf16 = extern_kernels.convolution(buf15, primals_16, stride=(1,),
            padding=(0,), dilation=(1,), transposed=False, output_padding=(
            0,), groups=1, bias=None)
        assert_size_stride(buf16, (4, 4, 4), (16, 4, 1))
        buf17 = extern_kernels.convolution(buf15, primals_18, stride=(1,),
            padding=(0,), dilation=(1,), transposed=False, output_padding=(
            0,), groups=1, bias=None)
        assert_size_stride(buf17, (4, 4, 4), (16, 4, 1))
        buf18 = buf17
        del buf17
        triton_poi_fused_convolution_relu_1[grid(64)](buf18, primals_19, 64,
            XBLOCK=64, num_warps=1, num_stages=1)
        del primals_19
        buf19 = extern_kernels.convolution(buf18, primals_20, stride=(1,),
            padding=(0,), dilation=(1,), transposed=False, output_padding=(
            0,), groups=1, bias=None)
        assert_size_stride(buf19, (4, 4, 4), (16, 4, 1))
        buf20 = buf13
        del buf13
        buf21 = empty_strided_cuda((4, 4, 1), (4, 1, 1), torch.int64)
        triton_poi_fused_add_convolution_max_relu_2[grid(16)](buf19,
            primals_21, buf16, primals_17, buf20, buf21, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf22 = empty_strided_cuda((4, 8, 4), (32, 4, 1), torch.float32)
        triton_poi_fused_cat_3[grid(128)](buf19, primals_21, buf16,
            primals_17, buf20, buf22, 128, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf23 = extern_kernels.convolution(buf22, primals_22, stride=(1,),
            padding=(0,), dilation=(1,), transposed=False, output_padding=(
            0,), groups=1, bias=None)
        assert_size_stride(buf23, (4, 4, 4), (16, 4, 1))
        buf24 = extern_kernels.convolution(buf22, primals_24, stride=(1,),
            padding=(0,), dilation=(1,), transposed=False, output_padding=(
            0,), groups=1, bias=None)
        assert_size_stride(buf24, (4, 4, 4), (16, 4, 1))
        buf25 = buf24
        del buf24
        triton_poi_fused_convolution_relu_1[grid(64)](buf25, primals_25, 64,
            XBLOCK=64, num_warps=1, num_stages=1)
        del primals_25
        buf26 = extern_kernels.convolution(buf25, primals_26, stride=(1,),
            padding=(0,), dilation=(1,), transposed=False, output_padding=(
            0,), groups=1, bias=None)
        assert_size_stride(buf26, (4, 4, 4), (16, 4, 1))
        buf27 = buf20
        del buf20
        buf28 = empty_strided_cuda((4, 4, 1), (4, 1, 1), torch.int64)
        triton_poi_fused_add_convolution_max_relu_2[grid(16)](buf26,
            primals_27, buf23, primals_23, buf27, buf28, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf29 = empty_strided_cuda((4, 8, 4), (32, 4, 1), torch.float32)
        triton_poi_fused_cat_3[grid(128)](buf26, primals_27, buf23,
            primals_23, buf27, buf29, 128, XBLOCK=128, num_warps=4,
            num_stages=1)
        buf30 = extern_kernels.convolution(buf29, primals_28, stride=(1,),
            padding=(0,), dilation=(1,), transposed=False, output_padding=(
            0,), groups=1, bias=None)
        assert_size_stride(buf30, (4, 4, 4), (16, 4, 1))
        buf31 = extern_kernels.convolution(buf29, primals_30, stride=(1,),
            padding=(0,), dilation=(1,), transposed=False, output_padding=(
            0,), groups=1, bias=None)
        assert_size_stride(buf31, (4, 4, 4), (16, 4, 1))
        buf32 = buf31
        del buf31
        triton_poi_fused_convolution_relu_1[grid(64)](buf32, primals_31, 64,
            XBLOCK=64, num_warps=1, num_stages=1)
        del primals_31
        buf33 = extern_kernels.convolution(buf32, primals_32, stride=(1,),
            padding=(0,), dilation=(1,), transposed=False, output_padding=(
            0,), groups=1, bias=None)
        assert_size_stride(buf33, (4, 4, 4), (16, 4, 1))
        buf34 = reinterpret_tensor(buf27, (4, 4), (4, 1), 0)
        del buf27
        buf35 = empty_strided_cuda((4, 4), (4, 1), torch.int64)
        triton_poi_fused_add_convolution_max_relu_2[grid(16)](buf33,
            primals_33, buf30, primals_29, buf34, buf35, 16, XBLOCK=16,
            num_warps=1, num_stages=1)
        buf36 = empty_strided_cuda((4, 4), (4, 1), torch.float32)
        extern_kernels.addmm(primals_35, buf34, reinterpret_tensor(
            primals_34, (4, 4), (1, 4), 0), alpha=1, beta=1, out=buf36)
        del primals_35
        buf37 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.bool)
        triton_poi_fused_add_convolution_relu_threshold_backward_4[grid(64)](
            buf33, primals_33, buf30, primals_29, buf37, 64, XBLOCK=64,
            num_warps=1, num_stages=1)
        del buf30
        del buf33
        del primals_29
        del primals_33
        buf38 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.bool)
        triton_poi_fused_add_convolution_relu_threshold_backward_4[grid(64)](
            buf26, primals_27, buf23, primals_23, buf38, 64, XBLOCK=64,
            num_warps=1, num_stages=1)
        del buf23
        del buf26
        del primals_23
        del primals_27
        buf39 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.bool)
        triton_poi_fused_add_convolution_relu_threshold_backward_4[grid(64)](
            buf19, primals_21, buf16, primals_17, buf39, 64, XBLOCK=64,
            num_warps=1, num_stages=1)
        del buf16
        del buf19
        del primals_17
        del primals_21
        buf40 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.bool)
        triton_poi_fused_add_convolution_relu_threshold_backward_4[grid(64)](
            buf12, primals_15, buf9, primals_11, buf40, 64, XBLOCK=64,
            num_warps=1, num_stages=1)
        del buf12
        del buf9
        del primals_11
        del primals_15
        buf41 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.bool)
        triton_poi_fused_add_convolution_relu_threshold_backward_4[grid(64)](
            buf5, primals_9, buf2, primals_5, buf41, 64, XBLOCK=64,
            num_warps=1, num_stages=1)
        del buf2
        del buf5
        del primals_5
        del primals_9
    return (buf36, primals_1, primals_3, 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, buf1, buf4, buf7, buf8, buf11, buf14, buf15,
        buf18, buf21, buf22, buf25, buf28, buf29, buf32, buf34, primals_34,
        reinterpret_tensor(buf35, (4, 4, 1), (4, 1, 1), 0), buf37, buf38,
        buf39, buf40, buf41)


class ResidualBlock(nn.Module):

    def __init__(self, in_channels, out_channels, hidden_dim):
        super().__init__()
        self.fc_0 = nn.Conv1d(in_channels, hidden_dim, 1)
        self.fc_1 = nn.Conv1d(hidden_dim, out_channels, 1)
        self.activation = nn.ReLU()
        if in_channels != out_channels:
            self.shortcut = nn.Conv1d(in_channels, out_channels, 1)
        else:
            self.shortcut = nn.Identity()
        nn.init.zeros_(self.fc_1.weight)

    def forward(self, x):
        x_short = self.shortcut(x)
        x = self.fc_0(x)
        x = self.fc_1(self.activation(x))
        x = self.activation(x + x_short)
        return x


class ResidualPointnetNew(nn.Module):
    """ PointNet-based encoder network with ResNet blocks.
    Args:
        c_dim (int): dimension of latent code c
        dim (int): input points dimension
        hidden_dim (int): hidden dimension of the network
    """

    def __init__(self, in_channels, out_channels, hidden_dim, segmentation=
        False):
        super().__init__()
        self.fc_in = nn.Conv1d(in_channels, 2 * hidden_dim, 1)
        self.block_0 = ResidualBlock(2 * hidden_dim, hidden_dim, hidden_dim)
        self.block_1 = ResidualBlock(2 * hidden_dim, hidden_dim, hidden_dim)
        self.block_2 = ResidualBlock(2 * hidden_dim, hidden_dim, hidden_dim)
        self.block_3 = ResidualBlock(2 * hidden_dim, hidden_dim, hidden_dim)
        self.block_4 = ResidualBlock(2 * hidden_dim, hidden_dim, hidden_dim)
        self.segmentation = segmentation
        if self.segmentation:
            self.fc_out = nn.Conv1d(2 * hidden_dim, out_channels, 1)
        else:
            self.fc_out = nn.Linear(hidden_dim, out_channels)

    def forward(self, input_0):
        primals_1 = self.fc_in.weight
        primals_2 = self.fc_in.bias
        primals_4 = self.block_0.fc_0.weight
        primals_5 = self.block_0.fc_0.bias
        primals_8 = self.block_0.fc_1.weight
        primals_7 = self.block_0.fc_1.bias
        primals_6 = self.block_0.shortcut.weight
        primals_9 = self.block_0.shortcut.bias
        primals_10 = self.block_1.fc_0.weight
        primals_11 = self.block_1.fc_0.bias
        primals_14 = self.block_1.fc_1.weight
        primals_13 = self.block_1.fc_1.bias
        primals_12 = self.block_1.shortcut.weight
        primals_15 = self.block_1.shortcut.bias
        primals_16 = self.block_2.fc_0.weight
        primals_17 = self.block_2.fc_0.bias
        primals_20 = self.block_2.fc_1.weight
        primals_19 = self.block_2.fc_1.bias
        primals_18 = self.block_2.shortcut.weight
        primals_21 = self.block_2.shortcut.bias
        primals_22 = self.block_3.fc_0.weight
        primals_23 = self.block_3.fc_0.bias
        primals_26 = self.block_3.fc_1.weight
        primals_25 = self.block_3.fc_1.bias
        primals_24 = self.block_3.shortcut.weight
        primals_27 = self.block_3.shortcut.bias
        primals_28 = self.block_4.fc_0.weight
        primals_29 = self.block_4.fc_0.bias
        primals_32 = self.block_4.fc_1.weight
        primals_31 = self.block_4.fc_1.bias
        primals_30 = self.block_4.shortcut.weight
        primals_33 = self.block_4.shortcut.bias
        primals_34 = self.fc_out.weight
        primals_35 = self.fc_out.bias
        primals_3 = 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])
        return output[0]


Measured latency_ms: 0.05639