| program(1.0) | |
| [buildInfo = dict<tensor<string, []>, tensor<string, []>>({{"coremlc-component-MIL", "3404.16.1"}, {"coremlc-version", "3404.23.1"}, {"coremltools-component-torch", "2.5.0"}, {"coremltools-source-dialect", "TorchScript"}, {"coremltools-version", "8.3.0"}})] | |
| { | |
| func main<ios17>(tensor<fp16, [240000]> audio) { | |
| tensor<string, []> cast_0_dtype_0 = const()[name = tensor<string, []>("cast_0_dtype_0"), val = tensor<string, []>("fp32")]; | |
| tensor<fp32, [128, 257]> mel_filters = const()[name = tensor<string, []>("mel_filters"), val = tensor<fp32, [128, 257]>(BLOBFILE(path = tensor<string, []>("@model_path/weights/weight.bin"), offset = tensor<uint64, []>(64)))]; | |
| 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<fp32, [240000]> cast_0 = cast(dtype = cast_0_dtype_0, x = audio)[name = tensor<string, []>("cast_9")]; | |
| tensor<fp32, [239999]> var_8 = slice_by_index(begin = var_8_begin_0, end = var_8_end_0, end_mask = var_8_end_mask_0, x = cast_0)[name = tensor<string, []>("op_8")]; | |
| 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<fp32, [239999]> var_13 = slice_by_index(begin = var_13_begin_0, end = var_13_end_0, end_mask = var_13_end_mask_0, x = cast_0)[name = tensor<string, []>("op_13")]; | |
| tensor<fp32, []> var_14 = const()[name = tensor<string, []>("op_14"), val = tensor<fp32, []>(0x1.f0a3d8p-1)]; | |
| tensor<fp32, [239999]> var_15 = mul(x = var_13, y = var_14)[name = tensor<string, []>("op_15")]; | |
| tensor<fp32, [239999]> input_1 = sub(x = var_8, y = var_15)[name = tensor<string, []>("input_1")]; | |
| tensor<fp32, []> const_0 = const()[name = tensor<string, []>("const_0"), val = tensor<fp32, []>(0x0p+0)]; | |
| 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<fp32, [240000]> input_3 = pad(constant_val = const_0, mode = input_3_mode_0, pad = input_3_pad_0, x = input_1)[name = tensor<string, []>("input_3")]; | |
| tensor<int32, [3]> var_30 = const()[name = tensor<string, []>("op_30"), val = tensor<int32, [3]>([1, 1, 240000])]; | |
| tensor<fp32, [1, 1, 240000]> input_5 = reshape(shape = var_30, x = input_3)[name = tensor<string, []>("input_5")]; | |
| tensor<fp32, []> const_2 = const()[name = tensor<string, []>("const_2"), val = tensor<fp32, []>(0x0p+0)]; | |
| 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<fp32, [1, 1, 240512]> input_7 = pad(constant_val = const_2, mode = input_7_mode_0, pad = input_7_pad_0, x = input_5)[name = tensor<string, []>("input_7")]; | |
| tensor<int32, [1]> var_42 = const()[name = tensor<string, []>("op_42"), val = tensor<int32, [1]>([240512])]; | |
| tensor<fp32, [240512]> input = reshape(shape = var_42, x = input_7)[name = tensor<string, []>("input")]; | |
| tensor<int32, [1]> expand_dims_0_axes_0 = const()[name = tensor<string, []>("expand_dims_0_axes_0"), val = tensor<int32, [1]>([0])]; | |
| tensor<fp32, [1, 240512]> expand_dims_0 = expand_dims(axes = expand_dims_0_axes_0, x = input)[name = tensor<string, []>("expand_dims_0")]; | |
| tensor<fp32, [257, 1, 512]> expand_dims_1 = const()[name = tensor<string, []>("expand_dims_1"), val = tensor<fp32, [257, 1, 512]>(BLOBFILE(path = tensor<string, []>("@model_path/weights/weight.bin"), offset = tensor<uint64, []>(131712)))]; | |
| tensor<fp32, [257, 1, 512]> expand_dims_2 = const()[name = tensor<string, []>("expand_dims_2"), val = tensor<fp32, [257, 1, 512]>(BLOBFILE(path = tensor<string, []>("@model_path/weights/weight.bin"), offset = tensor<uint64, []>(658112)))]; | |
| 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<fp32, [1, 1, 240512]> expand_dims_4 = expand_dims(axes = expand_dims_4_axes_0, x = expand_dims_0)[name = tensor<string, []>("expand_dims_4")]; | |
| 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<fp32, [1, 257, 1501]> conv_0 = 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, x = expand_dims_4)[name = tensor<string, []>("conv_0")]; | |
| 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<fp32, [1, 257, 1501]> conv_1 = 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, x = expand_dims_4)[name = tensor<string, []>("conv_1")]; | |
| tensor<int32, [1]> squeeze_0_axes_0 = const()[name = tensor<string, []>("squeeze_0_axes_0"), val = tensor<int32, [1]>([0])]; | |
| tensor<fp32, [257, 1501]> squeeze_0 = squeeze(axes = squeeze_0_axes_0, x = conv_0)[name = tensor<string, []>("squeeze_0")]; | |
| tensor<int32, [1]> squeeze_1_axes_0 = const()[name = tensor<string, []>("squeeze_1_axes_0"), val = tensor<int32, [1]>([0])]; | |
| tensor<fp32, [257, 1501]> squeeze_1 = squeeze(axes = squeeze_1_axes_0, x = conv_1)[name = tensor<string, []>("squeeze_1")]; | |
| tensor<fp32, [257, 1501]> square_1 = square(x = squeeze_0)[name = tensor<string, []>("square_1")]; | |
| tensor<fp32, [257, 1501]> square_2 = square(x = squeeze_1)[name = tensor<string, []>("square_2")]; | |
| tensor<fp32, [257, 1501]> add_1 = add(x = square_1, y = square_2)[name = tensor<string, []>("add_1")]; | |
| tensor<fp32, [257, 1501]> magnitudes = identity(x = add_1)[name = tensor<string, []>("magnitudes")]; | |
| 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<fp32, [128, 1501]> mel_spec_1 = matmul(transpose_x = mel_spec_1_transpose_x_0, transpose_y = mel_spec_1_transpose_y_0, x = mel_filters, y = magnitudes)[name = tensor<string, []>("mel_spec_1")]; | |
| tensor<fp32, []> var_56 = const()[name = tensor<string, []>("op_56"), val = tensor<fp32, []>(0x1p-24)]; | |
| tensor<fp32, [128, 1501]> mel_spec_3 = add(x = mel_spec_1, y = var_56)[name = tensor<string, []>("mel_spec_3")]; | |
| tensor<fp32, []> mel_spec_5_epsilon_0 = const()[name = tensor<string, []>("mel_spec_5_epsilon_0"), val = tensor<fp32, []>(0x1p-149)]; | |
| tensor<fp32, [128, 1501]> mel_spec_5 = log(epsilon = mel_spec_5_epsilon_0, x = mel_spec_3)[name = tensor<string, []>("mel_spec_5")]; | |
| 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<fp32, [128, 1]> per_feature_mean = reduce_mean(axes = per_feature_mean_axes_0, keep_dims = per_feature_mean_keep_dims_0, x = mel_spec_5)[name = tensor<string, []>("per_feature_mean")]; | |
| tensor<fp32, [128, 1501]> sub_0 = sub(x = mel_spec_5, y = per_feature_mean)[name = tensor<string, []>("sub_0")]; | |
| tensor<fp32, [128, 1501]> square_0 = square(x = sub_0)[name = tensor<string, []>("square_0")]; | |
| 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<fp32, [128, 1]> reduce_mean_1 = reduce_mean(axes = reduce_mean_1_axes_0, keep_dims = reduce_mean_1_keep_dims_0, x = square_0)[name = tensor<string, []>("reduce_mean_1")]; | |
| tensor<fp32, []> real_div_0 = const()[name = tensor<string, []>("real_div_0"), val = tensor<fp32, []>(0x1.002bbp+0)]; | |
| tensor<fp32, [128, 1]> mul_0 = mul(x = reduce_mean_1, y = real_div_0)[name = tensor<string, []>("mul_0")]; | |
| tensor<fp32, [128, 1]> sqrt_0 = sqrt(x = mul_0)[name = tensor<string, []>("sqrt_0")]; | |
| tensor<fp32, []> var_70 = const()[name = tensor<string, []>("op_70"), val = tensor<fp32, []>(0x1.4f8b58p-17)]; | |
| tensor<fp32, [128, 1]> per_feature_std = add(x = sqrt_0, y = var_70)[name = tensor<string, []>("per_feature_std")]; | |
| tensor<fp32, [128, 1501]> mel_spec = real_div(x = sub_0, y = per_feature_std)[name = tensor<string, []>("mel_spec")]; | |
| 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<fp32, [1501, 128]> var_75 = transpose(perm = var_75_perm_0, x = mel_spec)[name = tensor<string, []>("transpose_0")]; | |
| tensor<fp32, [1, 1501, 128]> var_77 = expand_dims(axes = var_77_axes_0, x = var_75)[name = tensor<string, []>("op_77")]; | |
| tensor<int32, [1]> var_79_axes_0 = const()[name = tensor<string, []>("op_79_axes_0"), val = tensor<int32, [1]>([1])]; | |
| tensor<fp32, [1, 1, 1501, 128]> var_79 = expand_dims(axes = var_79_axes_0, x = var_77)[name = tensor<string, []>("op_79")]; | |
| tensor<string, []> cast_7_dtype_0 = const()[name = tensor<string, []>("cast_7_dtype_0"), val = tensor<string, []>("fp16")]; | |
| tensor<fp16, [1, 1, 1501, 128]> melspectrogram_features = cast(dtype = cast_7_dtype_0, x = var_79)[name = tensor<string, []>("cast_8")]; | |
| } -> (melspectrogram_features); | |
| } |