MCPcopy Create free account
hub / github.com/PABannier/sam3.cpp / sam3_layer_norm

Function sam3_layer_norm

sam3.cpp:1041–1051  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1039}
1040
1041static 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
1053static struct ggml_tensor* sam3_layer_norm_2d(struct ggml_context* ctx,
1054 struct ggml_tensor* x,

Calls

no outgoing calls

Tested by

no test coverage detected