program(1.3) [buildInfo = dict({{"coremlc-component-MIL", "3520.4.1"}, {"coremlc-version", "3520.5.1"}, {"coremltools-component-torch", "2.11.0"}, {"coremltools-source-dialect", "TorchScript"}, {"coremltools-version", "9.0"}})] { func main(tensor input_lengths, tensor text_mask, tensor tokens) [FlexibleShapeInformation = tuple>>, tuple, ?>>>>((("DefaultShapes", {{"text_mask", [1, 57]}, {"tokens", [1, 57]}}), ("RangeDims", {{"text_mask", [[1, 1], [1, 512]]}, {"tokens", [[1, 1], [1, 512]]}})))] { int32 x_1_batch_dims_0 = const()[name = string("x_1_batch_dims_0"), val = int32(0)]; bool x_1_validate_indices_0 = const()[name = string("x_1_validate_indices_0"), val = bool(false)]; tensor text_encoder_embedding_weight_to_fp16 = const()[name = string("text_encoder_embedding_weight_to_fp16"), val = tensor(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(64)))]; string tokens_to_int16_dtype_0 = const()[name = string("tokens_to_int16_dtype_0"), val = string("int16")]; string cast_2_dtype_0 = const()[name = string("cast_2_dtype_0"), val = string("int32")]; int32 greater_equal_0_y_0 = const()[name = string("greater_equal_0_y_0"), val = int32(0)]; tensor tokens_to_int16 = cast(dtype = tokens_to_int16_dtype_0, x = tokens)[name = string("cast_6")]; tensor cast_2 = cast(dtype = cast_2_dtype_0, x = tokens_to_int16)[name = string("cast_5")]; tensor greater_equal_0 = greater_equal(x = cast_2, y = greater_equal_0_y_0)[name = string("greater_equal_0")]; int32 slice_by_index_0 = const()[name = string("slice_by_index_0"), val = int32(178)]; tensor add_2 = add(x = cast_2, y = slice_by_index_0)[name = string("add_2")]; tensor select_0 = select(a = cast_2, b = add_2, cond = greater_equal_0)[name = string("select_0")]; int32 x_1_cast_fp16_cast_uint16_axis_0 = const()[name = string("x_1_cast_fp16_cast_uint16_axis_0"), val = int32(0)]; string select_0_to_int16_dtype_0 = const()[name = string("select_0_to_int16_dtype_0"), val = string("int16")]; tensor select_0_to_int16 = cast(dtype = select_0_to_int16_dtype_0, x = select_0)[name = string("cast_4")]; tensor x_1_cast_fp16_cast_uint16_cast_uint16 = gather(axis = x_1_cast_fp16_cast_uint16_axis_0, batch_dims = x_1_batch_dims_0, indices = select_0_to_int16, validate_indices = x_1_validate_indices_0, x = text_encoder_embedding_weight_to_fp16)[name = string("x_1_cast_fp16_cast_uint16_cast_uint16")]; tensor x_3_perm_0 = const()[name = string("x_3_perm_0"), val = tensor([0, 2, 1])]; tensor var_30_axes_0 = const()[name = string("op_30_axes_0"), val = tensor([1])]; string text_mask_to_fp16_dtype_0 = const()[name = string("text_mask_to_fp16_dtype_0"), val = string("fp16")]; tensor text_mask_to_fp16 = cast(dtype = text_mask_to_fp16_dtype_0, x = text_mask)[name = string("cast_3")]; tensor var_30_cast_fp16 = expand_dims(axes = var_30_axes_0, x = text_mask_to_fp16)[name = string("op_30_cast_fp16")]; fp16 var_31_to_fp16 = const()[name = string("op_31_to_fp16"), val = fp16(0x1p+0)]; tensor keep_cast_fp16 = sub(x = var_31_to_fp16, y = var_30_cast_fp16)[name = string("keep_cast_fp16")]; tensor x_3_cast_fp16 = transpose(perm = x_3_perm_0, x = x_1_cast_fp16_cast_uint16_cast_uint16)[name = string("transpose_10")]; tensor input_1_cast_fp16 = mul(x = x_3_cast_fp16, y = keep_cast_fp16)[name = string("input_1_cast_fp16")]; fp32 var_35 = const()[name = string("op_35"), val = fp32(0x1.99999ap-3)]; string x_5_pad_type_0 = const()[name = string("x_5_pad_type_0"), val = string("custom")]; tensor x_5_pad_0 = const()[name = string("x_5_pad_0"), val = tensor([2, 2])]; tensor x_5_strides_0 = const()[name = string("x_5_strides_0"), val = tensor([1])]; tensor x_5_dilations_0 = const()[name = string("x_5_dilations_0"), val = tensor([1])]; int32 x_5_groups_0 = const()[name = string("x_5_groups_0"), val = int32(1)]; tensor weight_3_to_fp16 = const()[name = string("weight_3_to_fp16"), val = tensor(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(182400)))]; tensor text_encoder_cnn_0_0_bias_to_fp16 = const()[name = string("text_encoder_cnn_0_0_bias_to_fp16"), val = tensor(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(2803904)))]; tensor x_5_cast_fp16 = conv(bias = text_encoder_cnn_0_0_bias_to_fp16, dilations = x_5_dilations_0, groups = x_5_groups_0, pad = x_5_pad_0, pad_type = x_5_pad_type_0, strides = x_5_strides_0, weight = weight_3_to_fp16, x = input_1_cast_fp16)[name = string("x_5_cast_fp16")]; tensor input_3_perm_0 = const()[name = string("input_3_perm_0"), val = tensor([0, -1, 1])]; tensor x_7_axes_0 = const()[name = string("x_7_axes_0"), val = tensor([-1])]; tensor text_encoder_cnn_0_1_gamma_to_fp16 = const()[name = string("text_encoder_cnn_0_1_gamma_to_fp16"), val = tensor(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(2804992)))]; tensor text_encoder_cnn_0_1_beta_to_fp16 = const()[name = string("text_encoder_cnn_0_1_beta_to_fp16"), val = tensor(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(2806080)))]; fp16 var_38_to_fp16 = const()[name = string("op_38_to_fp16"), val = fp16(0x1.5p-17)]; tensor input_3_cast_fp16 = transpose(perm = input_3_perm_0, x = x_5_cast_fp16)[name = string("transpose_9")]; tensor x_7_cast_fp16 = layer_norm(axes = x_7_axes_0, beta = text_encoder_cnn_0_1_beta_to_fp16, epsilon = var_38_to_fp16, gamma = text_encoder_cnn_0_1_gamma_to_fp16, x = input_3_cast_fp16)[name = string("x_7_cast_fp16")]; tensor input_5_perm_0 = const()[name = string("input_5_perm_0"), val = tensor([0, -1, 1])]; tensor input_5_cast_fp16 = transpose(perm = input_5_perm_0, x = x_7_cast_fp16)[name = string("transpose_8")]; tensor x_9_cast_fp16 = leaky_relu(alpha = var_35, x = input_5_cast_fp16)[name = string("x_9_cast_fp16")]; tensor input_7_cast_fp16 = mul(x = x_9_cast_fp16, y = keep_cast_fp16)[name = string("input_7_cast_fp16")]; fp32 var_65 = const()[name = string("op_65"), val = fp32(0x1.99999ap-3)]; string x_11_pad_type_0 = const()[name = string("x_11_pad_type_0"), val = string("custom")]; tensor x_11_pad_0 = const()[name = string("x_11_pad_0"), val = tensor([2, 2])]; tensor x_11_strides_0 = const()[name = string("x_11_strides_0"), val = tensor([1])]; tensor x_11_dilations_0 = const()[name = string("x_11_dilations_0"), val = tensor([1])]; int32 x_11_groups_0 = const()[name = string("x_11_groups_0"), val = int32(1)]; tensor weight_7_to_fp16 = const()[name = string("weight_7_to_fp16"), val = tensor(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(2807168)))]; tensor text_encoder_cnn_1_0_bias_to_fp16 = const()[name = string("text_encoder_cnn_1_0_bias_to_fp16"), val = tensor(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(5428672)))]; tensor x_11_cast_fp16 = conv(bias = text_encoder_cnn_1_0_bias_to_fp16, dilations = x_11_dilations_0, groups = x_11_groups_0, pad = x_11_pad_0, pad_type = x_11_pad_type_0, strides = x_11_strides_0, weight = weight_7_to_fp16, x = input_7_cast_fp16)[name = string("x_11_cast_fp16")]; tensor input_9_perm_0 = const()[name = string("input_9_perm_0"), val = tensor([0, -1, 1])]; tensor x_13_axes_0 = const()[name = string("x_13_axes_0"), val = tensor([-1])]; tensor text_encoder_cnn_1_1_gamma_to_fp16 = const()[name = string("text_encoder_cnn_1_1_gamma_to_fp16"), val = tensor(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(5429760)))]; tensor text_encoder_cnn_1_1_beta_to_fp16 = const()[name = string("text_encoder_cnn_1_1_beta_to_fp16"), val = tensor(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(5430848)))]; fp16 var_68_to_fp16 = const()[name = string("op_68_to_fp16"), val = fp16(0x1.5p-17)]; tensor input_9_cast_fp16 = transpose(perm = input_9_perm_0, x = x_11_cast_fp16)[name = string("transpose_7")]; tensor x_13_cast_fp16 = layer_norm(axes = x_13_axes_0, beta = text_encoder_cnn_1_1_beta_to_fp16, epsilon = var_68_to_fp16, gamma = text_encoder_cnn_1_1_gamma_to_fp16, x = input_9_cast_fp16)[name = string("x_13_cast_fp16")]; tensor input_11_perm_0 = const()[name = string("input_11_perm_0"), val = tensor([0, -1, 1])]; tensor input_11_cast_fp16 = transpose(perm = input_11_perm_0, x = x_13_cast_fp16)[name = string("transpose_6")]; tensor x_15_cast_fp16 = leaky_relu(alpha = var_65, x = input_11_cast_fp16)[name = string("x_15_cast_fp16")]; tensor input_13_cast_fp16 = mul(x = x_15_cast_fp16, y = keep_cast_fp16)[name = string("input_13_cast_fp16")]; fp32 var_95 = const()[name = string("op_95"), val = fp32(0x1.99999ap-3)]; string x_17_pad_type_0 = const()[name = string("x_17_pad_type_0"), val = string("custom")]; tensor x_17_pad_0 = const()[name = string("x_17_pad_0"), val = tensor([2, 2])]; tensor x_17_strides_0 = const()[name = string("x_17_strides_0"), val = tensor([1])]; tensor x_17_dilations_0 = const()[name = string("x_17_dilations_0"), val = tensor([1])]; int32 x_17_groups_0 = const()[name = string("x_17_groups_0"), val = int32(1)]; tensor weight_11_to_fp16 = const()[name = string("weight_11_to_fp16"), val = tensor(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(5431936)))]; tensor text_encoder_cnn_2_0_bias_to_fp16 = const()[name = string("text_encoder_cnn_2_0_bias_to_fp16"), val = tensor(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(8053440)))]; tensor x_17_cast_fp16 = conv(bias = text_encoder_cnn_2_0_bias_to_fp16, dilations = x_17_dilations_0, groups = x_17_groups_0, pad = x_17_pad_0, pad_type = x_17_pad_type_0, strides = x_17_strides_0, weight = weight_11_to_fp16, x = input_13_cast_fp16)[name = string("x_17_cast_fp16")]; tensor input_15_perm_0 = const()[name = string("input_15_perm_0"), val = tensor([0, -1, 1])]; tensor x_19_axes_0 = const()[name = string("x_19_axes_0"), val = tensor([-1])]; tensor text_encoder_cnn_2_1_gamma_to_fp16 = const()[name = string("text_encoder_cnn_2_1_gamma_to_fp16"), val = tensor(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(8054528)))]; tensor text_encoder_cnn_2_1_beta_to_fp16 = const()[name = string("text_encoder_cnn_2_1_beta_to_fp16"), val = tensor(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(8055616)))]; fp16 var_98_to_fp16 = const()[name = string("op_98_to_fp16"), val = fp16(0x1.5p-17)]; tensor input_15_cast_fp16 = transpose(perm = input_15_perm_0, x = x_17_cast_fp16)[name = string("transpose_5")]; tensor x_19_cast_fp16 = layer_norm(axes = x_19_axes_0, beta = text_encoder_cnn_2_1_beta_to_fp16, epsilon = var_98_to_fp16, gamma = text_encoder_cnn_2_1_gamma_to_fp16, x = input_15_cast_fp16)[name = string("x_19_cast_fp16")]; tensor input_17_perm_0 = const()[name = string("input_17_perm_0"), val = tensor([0, -1, 1])]; tensor input_17_cast_fp16 = transpose(perm = input_17_perm_0, x = x_19_cast_fp16)[name = string("transpose_4")]; tensor x_21_cast_fp16 = leaky_relu(alpha = var_95, x = input_17_cast_fp16)[name = string("x_21_cast_fp16")]; tensor x_23_cast_fp16 = mul(x = x_21_cast_fp16, y = keep_cast_fp16)[name = string("x_23_cast_fp16")]; tensor transpose_0_perm_0 = const()[name = string("transpose_0_perm_0"), val = tensor([2, 0, 1])]; string x_25_batch_first_direction_0 = const()[name = string("x_25_batch_first_direction_0"), val = string("bidirectional")]; bool x_25_batch_first_output_sequence_0 = const()[name = string("x_25_batch_first_output_sequence_0"), val = bool(true)]; string x_25_batch_first_recurrent_activation_0 = const()[name = string("x_25_batch_first_recurrent_activation_0"), val = string("sigmoid")]; string x_25_batch_first_cell_activation_0 = const()[name = string("x_25_batch_first_cell_activation_0"), val = string("tanh")]; string x_25_batch_first_activation_0 = const()[name = string("x_25_batch_first_activation_0"), val = string("tanh")]; tensor x_25_batch_first_lstm_h0_reshaped_to_fp16 = const()[name = string("x_25_batch_first_lstm_h0_reshaped_to_fp16"), val = tensor(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(8056704)))]; tensor concat_4_to_fp16 = const()[name = string("concat_4_to_fp16"), val = tensor(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(8057792)))]; tensor concat_5_to_fp16 = const()[name = string("concat_5_to_fp16"), val = tensor(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(9106432)))]; tensor add_0_to_fp16 = const()[name = string("add_0_to_fp16"), val = tensor(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(9630784)))]; tensor concat_6_to_fp16 = const()[name = string("concat_6_to_fp16"), val = tensor(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(9632896)))]; tensor concat_7_to_fp16 = const()[name = string("concat_7_to_fp16"), val = tensor(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(10681536)))]; tensor add_1_to_fp16 = const()[name = string("add_1_to_fp16"), val = tensor(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(11205888)))]; tensor transpose_0_cast_fp16 = transpose(perm = transpose_0_perm_0, x = x_23_cast_fp16)[name = string("transpose_3")]; tensor x_25_batch_first_cast_fp16_0, tensor x_25_batch_first_cast_fp16_1, tensor x_25_batch_first_cast_fp16_2 = lstm(activation = x_25_batch_first_activation_0, bias = add_0_to_fp16, bias_back = add_1_to_fp16, cell_activation = x_25_batch_first_cell_activation_0, direction = x_25_batch_first_direction_0, initial_c = x_25_batch_first_lstm_h0_reshaped_to_fp16, initial_h = x_25_batch_first_lstm_h0_reshaped_to_fp16, output_sequence = x_25_batch_first_output_sequence_0, recurrent_activation = x_25_batch_first_recurrent_activation_0, weight_hh = concat_5_to_fp16, weight_hh_back = concat_7_to_fp16, weight_ih = concat_4_to_fp16, weight_ih_back = concat_6_to_fp16, x = transpose_0_cast_fp16)[name = string("x_25_batch_first_cast_fp16")]; tensor transpose_1_perm_0 = const()[name = string("transpose_1_perm_0"), val = tensor([1, 2, 0])]; tensor transpose_1_cast_fp16 = transpose(perm = transpose_1_perm_0, x = x_25_batch_first_cast_fp16_0)[name = string("transpose_2")]; tensor var_159 = mul(x = transpose_1_cast_fp16, y = keep_cast_fp16)[name = string("op_159_cast_fp16")]; tensor input_lengths_tmp = identity(x = input_lengths)[name = string("input_lengths_tmp")]; } -> (var_159); }