File size: 12,596 Bytes
329334c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
56a575d
 
329334c
 
56a575d
 
329334c
 
 
 
 
 
 
 
 
56a575d
 
 
 
 
 
 
329334c
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
program(1.0)
[buildInfo = dict<tensor<string, []>, tensor<string, []>>({{"coremlc-component-MIL", "3401.3.1"}, {"coremlc-version", "3401.4.1"}, {"coremltools-component-torch", "2.6.0"}, {"coremltools-source-dialect", "TorchScript"}, {"coremltools-version", "8.2"}})]
{
    func main<ios17>(tensor<fp16, [240000]> audio) {
            tensor<int32, [1]> var_8_begin_0 = const()[name = tensor<string, []>("op_8_begin_0"), val = tensor<int32, [1]>([1])];
            tensor<int32, [1]> var_8_end_0 = const()[name = tensor<string, []>("op_8_end_0"), val = tensor<int32, [1]>([240000])];
            tensor<bool, [1]> var_8_end_mask_0 = const()[name = tensor<string, []>("op_8_end_mask_0"), val = tensor<bool, [1]>([true])];
            tensor<fp16, [239999]> var_8_cast_fp16 = slice_by_index(begin = var_8_begin_0, end = var_8_end_0, end_mask = var_8_end_mask_0, x = audio)[name = tensor<string, []>("op_8_cast_fp16")];
            tensor<int32, [1]> var_13_begin_0 = const()[name = tensor<string, []>("op_13_begin_0"), val = tensor<int32, [1]>([0])];
            tensor<int32, [1]> var_13_end_0 = const()[name = tensor<string, []>("op_13_end_0"), val = tensor<int32, [1]>([239999])];
            tensor<bool, [1]> var_13_end_mask_0 = const()[name = tensor<string, []>("op_13_end_mask_0"), val = tensor<bool, [1]>([false])];
            tensor<fp16, [239999]> var_13_cast_fp16 = slice_by_index(begin = var_13_begin_0, end = var_13_end_0, end_mask = var_13_end_mask_0, x = audio)[name = tensor<string, []>("op_13_cast_fp16")];
            tensor<fp16, []> var_14_to_fp16 = const()[name = tensor<string, []>("op_14_to_fp16"), val = tensor<fp16, []>(0x1.f0cp-1)];
            tensor<fp16, [239999]> var_15_cast_fp16 = mul(x = var_13_cast_fp16, y = var_14_to_fp16)[name = tensor<string, []>("op_15_cast_fp16")];
            tensor<fp16, [239999]> input_1_cast_fp16 = sub(x = var_8_cast_fp16, y = var_15_cast_fp16)[name = tensor<string, []>("input_1_cast_fp16")];
            tensor<int32, [2]> input_3_pad_0 = const()[name = tensor<string, []>("input_3_pad_0"), val = tensor<int32, [2]>([1, 0])];
            tensor<string, []> input_3_mode_0 = const()[name = tensor<string, []>("input_3_mode_0"), val = tensor<string, []>("constant")];
            tensor<fp16, []> const_0_to_fp16 = const()[name = tensor<string, []>("const_0_to_fp16"), val = tensor<fp16, []>(0x0p+0)];
            tensor<fp16, [240000]> input_3_cast_fp16 = pad(constant_val = const_0_to_fp16, mode = input_3_mode_0, pad = input_3_pad_0, x = input_1_cast_fp16)[name = tensor<string, []>("input_3_cast_fp16")];
            tensor<int32, [3]> var_30 = const()[name = tensor<string, []>("op_30"), val = tensor<int32, [3]>([1, 1, 240000])];
            tensor<fp16, [1, 1, 240000]> input_5_cast_fp16 = reshape(shape = var_30, x = input_3_cast_fp16)[name = tensor<string, []>("input_5_cast_fp16")];
            tensor<int32, [6]> input_7_pad_0 = const()[name = tensor<string, []>("input_7_pad_0"), val = tensor<int32, [6]>([0, 0, 0, 0, 256, 256])];
            tensor<string, []> input_7_mode_0 = const()[name = tensor<string, []>("input_7_mode_0"), val = tensor<string, []>("reflect")];
            tensor<fp16, []> const_2_to_fp16 = const()[name = tensor<string, []>("const_2_to_fp16"), val = tensor<fp16, []>(0x0p+0)];
            tensor<fp16, [1, 1, 240512]> input_7_cast_fp16 = pad(constant_val = const_2_to_fp16, mode = input_7_mode_0, pad = input_7_pad_0, x = input_5_cast_fp16)[name = tensor<string, []>("input_7_cast_fp16")];
            tensor<int32, [1]> var_42 = const()[name = tensor<string, []>("op_42"), val = tensor<int32, [1]>([240512])];
            tensor<fp16, [240512]> input_cast_fp16 = reshape(shape = var_42, x = input_7_cast_fp16)[name = tensor<string, []>("input_cast_fp16")];
            tensor<int32, [1]> expand_dims_0_axes_0 = const()[name = tensor<string, []>("expand_dims_0_axes_0"), val = tensor<int32, [1]>([0])];
            tensor<fp16, [1, 240512]> expand_dims_0_cast_fp16 = expand_dims(axes = expand_dims_0_axes_0, x = input_cast_fp16)[name = tensor<string, []>("expand_dims_0_cast_fp16")];
            tensor<int32, [1]> expand_dims_3 = const()[name = tensor<string, []>("expand_dims_3"), val = tensor<int32, [1]>([160])];
            tensor<int32, [1]> expand_dims_4_axes_0 = const()[name = tensor<string, []>("expand_dims_4_axes_0"), val = tensor<int32, [1]>([1])];
            tensor<fp16, [1, 1, 240512]> expand_dims_4_cast_fp16 = expand_dims(axes = expand_dims_4_axes_0, x = expand_dims_0_cast_fp16)[name = tensor<string, []>("expand_dims_4_cast_fp16")];
            tensor<string, []> conv_0_pad_type_0 = const()[name = tensor<string, []>("conv_0_pad_type_0"), val = tensor<string, []>("valid")];
            tensor<int32, [2]> conv_0_pad_0 = const()[name = tensor<string, []>("conv_0_pad_0"), val = tensor<int32, [2]>([0, 0])];
            tensor<int32, [1]> conv_0_dilations_0 = const()[name = tensor<string, []>("conv_0_dilations_0"), val = tensor<int32, [1]>([1])];
            tensor<int32, []> conv_0_groups_0 = const()[name = tensor<string, []>("conv_0_groups_0"), val = tensor<int32, []>(1)];
            tensor<fp16, [257, 1, 512]> expand_dims_1_to_fp16 = const()[name = tensor<string, []>("expand_dims_1_to_fp16"), val = tensor<fp16, [257, 1, 512]>(BLOBFILE(path = tensor<string, []>("@model_path/weights/weight.bin"), offset = tensor<uint64, []>(64)))];
            tensor<fp16, [1, 257, 1501]> conv_0_cast_fp16 = conv(dilations = conv_0_dilations_0, groups = conv_0_groups_0, pad = conv_0_pad_0, pad_type = conv_0_pad_type_0, strides = expand_dims_3, weight = expand_dims_1_to_fp16, x = expand_dims_4_cast_fp16)[name = tensor<string, []>("conv_0_cast_fp16")];
            tensor<string, []> conv_1_pad_type_0 = const()[name = tensor<string, []>("conv_1_pad_type_0"), val = tensor<string, []>("valid")];
            tensor<int32, [2]> conv_1_pad_0 = const()[name = tensor<string, []>("conv_1_pad_0"), val = tensor<int32, [2]>([0, 0])];
            tensor<int32, [1]> conv_1_dilations_0 = const()[name = tensor<string, []>("conv_1_dilations_0"), val = tensor<int32, [1]>([1])];
            tensor<int32, []> conv_1_groups_0 = const()[name = tensor<string, []>("conv_1_groups_0"), val = tensor<int32, []>(1)];
            tensor<fp16, [257, 1, 512]> expand_dims_2_to_fp16 = const()[name = tensor<string, []>("expand_dims_2_to_fp16"), val = tensor<fp16, [257, 1, 512]>(BLOBFILE(path = tensor<string, []>("@model_path/weights/weight.bin"), offset = tensor<uint64, []>(263296)))];
            tensor<fp16, [1, 257, 1501]> conv_1_cast_fp16 = conv(dilations = conv_1_dilations_0, groups = conv_1_groups_0, pad = conv_1_pad_0, pad_type = conv_1_pad_type_0, strides = expand_dims_3, weight = expand_dims_2_to_fp16, x = expand_dims_4_cast_fp16)[name = tensor<string, []>("conv_1_cast_fp16")];
            tensor<int32, [1]> squeeze_0_axes_0 = const()[name = tensor<string, []>("squeeze_0_axes_0"), val = tensor<int32, [1]>([0])];
            tensor<fp16, [257, 1501]> squeeze_0_cast_fp16 = squeeze(axes = squeeze_0_axes_0, x = conv_0_cast_fp16)[name = tensor<string, []>("squeeze_0_cast_fp16")];
            tensor<int32, [1]> squeeze_1_axes_0 = const()[name = tensor<string, []>("squeeze_1_axes_0"), val = tensor<int32, [1]>([0])];
            tensor<fp16, [257, 1501]> squeeze_1_cast_fp16 = squeeze(axes = squeeze_1_axes_0, x = conv_1_cast_fp16)[name = tensor<string, []>("squeeze_1_cast_fp16")];
            tensor<fp16, [257, 1501]> square_1_cast_fp16 = square(x = squeeze_0_cast_fp16)[name = tensor<string, []>("square_1_cast_fp16")];
            tensor<fp16, [257, 1501]> square_2_cast_fp16 = square(x = squeeze_1_cast_fp16)[name = tensor<string, []>("square_2_cast_fp16")];
            tensor<fp16, [257, 1501]> add_1_cast_fp16 = add(x = square_1_cast_fp16, y = square_2_cast_fp16)[name = tensor<string, []>("add_1_cast_fp16")];
            tensor<fp16, [257, 1501]> magnitudes_cast_fp16 = identity(x = add_1_cast_fp16)[name = tensor<string, []>("magnitudes_cast_fp16")];
            tensor<bool, []> mel_spec_1_transpose_x_0 = const()[name = tensor<string, []>("mel_spec_1_transpose_x_0"), val = tensor<bool, []>(false)];
            tensor<bool, []> mel_spec_1_transpose_y_0 = const()[name = tensor<string, []>("mel_spec_1_transpose_y_0"), val = tensor<bool, []>(false)];
            tensor<fp16, [128, 257]> mel_filters_to_fp16 = const()[name = tensor<string, []>("mel_filters_to_fp16"), val = tensor<fp16, [128, 257]>(BLOBFILE(path = tensor<string, []>("@model_path/weights/weight.bin"), offset = tensor<uint64, []>(526528)))];
            tensor<fp16, [128, 1501]> mel_spec_1_cast_fp16 = matmul(transpose_x = mel_spec_1_transpose_x_0, transpose_y = mel_spec_1_transpose_y_0, x = mel_filters_to_fp16, y = magnitudes_cast_fp16)[name = tensor<string, []>("mel_spec_1_cast_fp16")];
            tensor<fp16, []> var_56_to_fp16 = const()[name = tensor<string, []>("op_56_to_fp16"), val = tensor<fp16, []>(0x1p-24)];
            tensor<fp16, [128, 1501]> mel_spec_3_cast_fp16 = add(x = mel_spec_1_cast_fp16, y = var_56_to_fp16)[name = tensor<string, []>("mel_spec_3_cast_fp16")];
            tensor<fp32, []> mel_spec_5_epsilon_0 = const()[name = tensor<string, []>("mel_spec_5_epsilon_0"), val = tensor<fp32, []>(0x1p-149)];
            tensor<fp16, [128, 1501]> mel_spec_5_cast_fp16 = log(epsilon = mel_spec_5_epsilon_0, x = mel_spec_3_cast_fp16)[name = tensor<string, []>("mel_spec_5_cast_fp16")];
            tensor<int32, [1]> per_feature_mean_axes_0 = const()[name = tensor<string, []>("per_feature_mean_axes_0"), val = tensor<int32, [1]>([-1])];
            tensor<bool, []> per_feature_mean_keep_dims_0 = const()[name = tensor<string, []>("per_feature_mean_keep_dims_0"), val = tensor<bool, []>(true)];
            tensor<fp16, [128, 1]> per_feature_mean_cast_fp16 = reduce_mean(axes = per_feature_mean_axes_0, keep_dims = per_feature_mean_keep_dims_0, x = mel_spec_5_cast_fp16)[name = tensor<string, []>("per_feature_mean_cast_fp16")];
            tensor<fp16, [128, 1501]> sub_0_cast_fp16 = sub(x = mel_spec_5_cast_fp16, y = per_feature_mean_cast_fp16)[name = tensor<string, []>("sub_0_cast_fp16")];
            tensor<fp16, [128, 1501]> square_0_cast_fp16 = square(x = sub_0_cast_fp16)[name = tensor<string, []>("square_0_cast_fp16")];
            tensor<int32, [1]> reduce_mean_1_axes_0 = const()[name = tensor<string, []>("reduce_mean_1_axes_0"), val = tensor<int32, [1]>([-1])];
            tensor<bool, []> reduce_mean_1_keep_dims_0 = const()[name = tensor<string, []>("reduce_mean_1_keep_dims_0"), val = tensor<bool, []>(true)];
            tensor<fp16, [128, 1]> reduce_mean_1_cast_fp16 = reduce_mean(axes = reduce_mean_1_axes_0, keep_dims = reduce_mean_1_keep_dims_0, x = square_0_cast_fp16)[name = tensor<string, []>("reduce_mean_1_cast_fp16")];
            tensor<fp16, []> real_div_0_to_fp16 = const()[name = tensor<string, []>("real_div_0_to_fp16"), val = tensor<fp16, []>(0x1.004p+0)];
            tensor<fp16, [128, 1]> mul_0_cast_fp16 = mul(x = reduce_mean_1_cast_fp16, y = real_div_0_to_fp16)[name = tensor<string, []>("mul_0_cast_fp16")];
            tensor<fp16, [128, 1]> sqrt_0_cast_fp16 = sqrt(x = mul_0_cast_fp16)[name = tensor<string, []>("sqrt_0_cast_fp16")];
            tensor<fp16, []> var_70_to_fp16 = const()[name = tensor<string, []>("op_70_to_fp16"), val = tensor<fp16, []>(0x1.5p-17)];
            tensor<fp16, [128, 1]> per_feature_std_cast_fp16 = add(x = sqrt_0_cast_fp16, y = var_70_to_fp16)[name = tensor<string, []>("per_feature_std_cast_fp16")];
            tensor<fp16, [128, 1501]> mel_spec_cast_fp16 = real_div(x = sub_0_cast_fp16, y = per_feature_std_cast_fp16)[name = tensor<string, []>("mel_spec_cast_fp16")];
            tensor<int32, [2]> var_75_perm_0 = const()[name = tensor<string, []>("op_75_perm_0"), val = tensor<int32, [2]>([1, 0])];
            tensor<int32, [1]> var_77_axes_0 = const()[name = tensor<string, []>("op_77_axes_0"), val = tensor<int32, [1]>([0])];
            tensor<fp16, [1501, 128]> var_75_cast_fp16 = transpose(perm = var_75_perm_0, x = mel_spec_cast_fp16)[name = tensor<string, []>("transpose_0")];
            tensor<fp16, [1, 1501, 128]> var_77_cast_fp16 = expand_dims(axes = var_77_axes_0, x = var_75_cast_fp16)[name = tensor<string, []>("op_77_cast_fp16")];
            tensor<int32, [1]> var_79_axes_0 = const()[name = tensor<string, []>("op_79_axes_0"), val = tensor<int32, [1]>([1])];
            tensor<fp16, [1, 1, 1501, 128]> melspectrogram_features = expand_dims(axes = var_79_axes_0, x = var_77_cast_fp16)[name = tensor<string, []>("op_79_cast_fp16")];
        } -> (melspectrogram_features);
}