program(1.0) [buildInfo = dict, tensor>({{"coremlc-component-MIL", "3405.2.1"}, {"coremlc-version", "3404.23.1"}, {"coremltools-component-torch", "2.7.0"}, {"coremltools-source-dialect", "TorchScript"}, {"coremltools-version", "9.0b1"}})] { func main(tensor c_in, tensor h_in, tensor target_length, tensor targets) { tensor module_prediction_embed_weight = const()[name = tensor("module_prediction_embed_weight"), val = tensor(BLOBFILE(path = tensor("@model_path/weights/weight.bin"), offset = tensor(64)))]; tensor y_batch_dims_0 = const()[name = tensor("y_batch_dims_0"), val = tensor(0)]; tensor y_validate_indices_0 = const()[name = tensor("y_validate_indices_0"), val = tensor(false)]; tensor greater_equal_0_y_0 = const()[name = tensor("greater_equal_0_y_0"), val = tensor(0)]; tensor greater_equal_0 = greater_equal(x = targets, y = greater_equal_0_y_0)[name = tensor("greater_equal_0")]; tensor slice_by_index_0 = const()[name = tensor("slice_by_index_0"), val = tensor(1025)]; tensor add_2 = add(x = targets, y = slice_by_index_0)[name = tensor("add_2")]; tensor select_0 = select(a = targets, b = add_2, cond = greater_equal_0)[name = tensor("select_0")]; tensor y_axis_1 = const()[name = tensor("y_axis_1"), val = tensor(0)]; tensor y = gather(axis = y_axis_1, batch_dims = y_batch_dims_0, indices = select_0, validate_indices = y_validate_indices_0, x = module_prediction_embed_weight)[name = tensor("y")]; tensor input_3_perm_0 = const()[name = tensor("input_3_perm_0"), val = tensor([1, 0, 2])]; tensor split_0_num_splits_0 = const()[name = tensor("split_0_num_splits_0"), val = tensor(2)]; tensor split_0_axis_0 = const()[name = tensor("split_0_axis_0"), val = tensor(0)]; tensor split_0_0, tensor split_0_1 = split(axis = split_0_axis_0, num_splits = split_0_num_splits_0, x = h_in)[name = tensor("split_0")]; tensor split_1_num_splits_0 = const()[name = tensor("split_1_num_splits_0"), val = tensor(2)]; tensor split_1_axis_0 = const()[name = tensor("split_1_axis_0"), val = tensor(0)]; tensor split_1_0, tensor split_1_1 = split(axis = split_1_axis_0, num_splits = split_1_num_splits_0, x = c_in)[name = tensor("split_1")]; tensor concat_0 = const()[name = tensor("concat_0"), val = tensor(BLOBFILE(path = tensor("@model_path/weights/weight.bin"), offset = tensor(2624128)))]; tensor concat_1 = const()[name = tensor("concat_1"), val = tensor(BLOBFILE(path = tensor("@model_path/weights/weight.bin"), offset = tensor(2634432)))]; tensor concat_2 = const()[name = tensor("concat_2"), val = tensor(BLOBFILE(path = tensor("@model_path/weights/weight.bin"), offset = tensor(9188096)))]; tensor input_lstm_layer_0_lstm_h0_squeeze_axes_0 = const()[name = tensor("input_lstm_layer_0_lstm_h0_squeeze_axes_0"), val = tensor([0])]; tensor input_lstm_layer_0_lstm_h0_squeeze = squeeze(axes = input_lstm_layer_0_lstm_h0_squeeze_axes_0, x = split_0_0)[name = tensor("input_lstm_layer_0_lstm_h0_squeeze")]; tensor input_lstm_layer_0_lstm_c0_squeeze_axes_0 = const()[name = tensor("input_lstm_layer_0_lstm_c0_squeeze_axes_0"), val = tensor([0])]; tensor input_lstm_layer_0_lstm_c0_squeeze = squeeze(axes = input_lstm_layer_0_lstm_c0_squeeze_axes_0, x = split_1_0)[name = tensor("input_lstm_layer_0_lstm_c0_squeeze")]; tensor input_lstm_layer_0_direction_0 = const()[name = tensor("input_lstm_layer_0_direction_0"), val = tensor("forward")]; tensor input_lstm_layer_0_output_sequence_0 = const()[name = tensor("input_lstm_layer_0_output_sequence_0"), val = tensor(true)]; tensor input_lstm_layer_0_recurrent_activation_0 = const()[name = tensor("input_lstm_layer_0_recurrent_activation_0"), val = tensor("sigmoid")]; tensor input_lstm_layer_0_cell_activation_0 = const()[name = tensor("input_lstm_layer_0_cell_activation_0"), val = tensor("tanh")]; tensor input_lstm_layer_0_activation_0 = const()[name = tensor("input_lstm_layer_0_activation_0"), val = tensor("tanh")]; tensor input_3 = transpose(perm = input_3_perm_0, x = y)[name = tensor("transpose_2")]; tensor input_lstm_layer_0_0, tensor input_lstm_layer_0_1, tensor input_lstm_layer_0_2 = lstm(activation = input_lstm_layer_0_activation_0, bias = concat_0, cell_activation = input_lstm_layer_0_cell_activation_0, direction = input_lstm_layer_0_direction_0, initial_c = input_lstm_layer_0_lstm_c0_squeeze, initial_h = input_lstm_layer_0_lstm_h0_squeeze, output_sequence = input_lstm_layer_0_output_sequence_0, recurrent_activation = input_lstm_layer_0_recurrent_activation_0, weight_hh = concat_2, weight_ih = concat_1, x = input_3)[name = tensor("input_lstm_layer_0")]; tensor concat_3 = const()[name = tensor("concat_3"), val = tensor(BLOBFILE(path = tensor("@model_path/weights/weight.bin"), offset = tensor(15741760)))]; tensor concat_4 = const()[name = tensor("concat_4"), val = tensor(BLOBFILE(path = tensor("@model_path/weights/weight.bin"), offset = tensor(15752064)))]; tensor concat_5 = const()[name = tensor("concat_5"), val = tensor(BLOBFILE(path = tensor("@model_path/weights/weight.bin"), offset = tensor(22305728)))]; tensor input_lstm_h0_squeeze_axes_0 = const()[name = tensor("input_lstm_h0_squeeze_axes_0"), val = tensor([0])]; tensor input_lstm_h0_squeeze = squeeze(axes = input_lstm_h0_squeeze_axes_0, x = split_0_1)[name = tensor("input_lstm_h0_squeeze")]; tensor input_lstm_c0_squeeze_axes_0 = const()[name = tensor("input_lstm_c0_squeeze_axes_0"), val = tensor([0])]; tensor input_lstm_c0_squeeze = squeeze(axes = input_lstm_c0_squeeze_axes_0, x = split_1_1)[name = tensor("input_lstm_c0_squeeze")]; tensor input_direction_0 = const()[name = tensor("input_direction_0"), val = tensor("forward")]; tensor input_output_sequence_0 = const()[name = tensor("input_output_sequence_0"), val = tensor(true)]; tensor input_recurrent_activation_0 = const()[name = tensor("input_recurrent_activation_0"), val = tensor("sigmoid")]; tensor input_cell_activation_0 = const()[name = tensor("input_cell_activation_0"), val = tensor("tanh")]; tensor input_activation_0 = const()[name = tensor("input_activation_0"), val = tensor("tanh")]; tensor input_0, tensor input_1, tensor input_2 = lstm(activation = input_activation_0, bias = concat_3, cell_activation = input_cell_activation_0, direction = input_direction_0, initial_c = input_lstm_c0_squeeze, initial_h = input_lstm_h0_squeeze, output_sequence = input_output_sequence_0, recurrent_activation = input_recurrent_activation_0, weight_hh = concat_5, weight_ih = concat_4, x = input_lstm_layer_0_0)[name = tensor("input")]; tensor obj_3_axis_0 = const()[name = tensor("obj_3_axis_0"), val = tensor(0)]; tensor h_out = stack(axis = obj_3_axis_0, values = (input_lstm_layer_0_1, input_1))[name = tensor("obj_3")]; tensor obj_axis_0 = const()[name = tensor("obj_axis_0"), val = tensor(0)]; tensor c_out = stack(axis = obj_axis_0, values = (input_lstm_layer_0_2, input_2))[name = tensor("obj")]; tensor transpose_0_perm_0 = const()[name = tensor("transpose_0_perm_0"), val = tensor([1, 2, 0])]; tensor decoder = transpose(perm = transpose_0_perm_0, x = input_0)[name = tensor("transpose_1")]; tensor target_length_tmp = identity(x = target_length)[name = tensor("target_length_tmp")]; } -> (decoder, h_out, c_out); }