| 1039 | } |
| 1040 | |
| 1041 | static struct ggml_tensor* sam3_layer_norm(struct ggml_context* ctx, |
| 1042 | struct ggml_tensor* x, |
| 1043 | struct ggml_tensor* w, |
| 1044 | struct ggml_tensor* b) { |
| 1045 | x = ggml_norm(ctx, x, 1e-5f); |
| 1046 | x = ggml_mul_inplace(ctx, x, w); |
| 1047 | if (b) { |
| 1048 | x = ggml_add_inplace(ctx, x, b); |
| 1049 | } |
| 1050 | return x; |
| 1051 | } |
| 1052 | |
| 1053 | static struct ggml_tensor* sam3_layer_norm_2d(struct ggml_context* ctx, |
| 1054 | struct ggml_tensor* x, |
no outgoing calls
no test coverage detected