| 2646 | // ggml_leaky_relu |
| 2647 | |
| 2648 | struct ggml_tensor * ggml_leaky_relu( |
| 2649 | struct ggml_context * ctx, |
| 2650 | struct ggml_tensor * a, |
| 2651 | float negative_slope, |
| 2652 | bool inplace) { |
| 2653 | struct ggml_tensor * result = inplace ? ggml_view_tensor(ctx, a) : ggml_dup_tensor(ctx, a); |
| 2654 | |
| 2655 | ggml_set_op_params(result, &negative_slope, sizeof(negative_slope)); |
| 2656 | |
| 2657 | result->op = GGML_OP_LEAKY_RELU; |
| 2658 | result->src[0] = a; |
| 2659 | |
| 2660 | return result; |
| 2661 | } |
| 2662 | |
| 2663 | // ggml_sigmoid |
| 2664 |