feat(i18n): French and German localization (phase 5)
- Add full message catalogs and content for French (fr) and German (de) - Implement ASCII canonical slugs for French and German routes - Add language-specific search endpoints (/api/busca/fr, /api/busca/de) - Configure strict 404 responses for /fr/livro and /de/livro - Localize SEO, OpenGraph (fr_FR, de_DE), Twitter and JSON-LD schemas - Add localized code example comments across 14 examples for fr and de - Enable 'fr' and 'de' in ENABLED_LOCALES with root negotiation and redirect - Extend test suite in check-i18n, smoke-imagem and verifica-vazamentos Co-Authored-By: Antigravity <noreply@google.com>
This commit is contained in:
1 parent
7b673aeb4b
commit
7fce46b9e1
104 files changed
+33369
-686
No files matched your search
@@ -0,0 +1,44 @@
|
||||
#include <stdio.h>
|
||||
#include "esp_nn.h"
|
||||
#include "esp_nn_defs.h"
|
||||
|
||||
#define INPUT_SIZE 4
|
||||
#define OUTPUT_SIZE 3
|
||||
|
||||
void print_array(const char *label, int16_t *array, int size) {
|
||||
printf("%s: ", label);
|
||||
for (int i = 0; i < size; i++) {
|
||||
printf("%d ", array[i]);
|
||||
}
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
void app_main(void)
|
||||
{
|
||||
// Vetor de entrada (ex: saída de uma camada anterior)
|
||||
int16_t input[INPUT_SIZE] = {1, 2, 3, 4};
|
||||
|
||||
// Pesos da camada densa (3x4)
|
||||
int8_t weights[OUTPUT_SIZE * INPUT_SIZE] = {
|
||||
1, -1, 2, 0,
|
||||
0, 1, -1, 1,
|
||||
2, 0, 1, -2
|
||||
};
|
||||
|
||||
// Bias de cada neurônio
|
||||
int16_t bias[OUTPUT_SIZE] = {10, -5, 0};
|
||||
|
||||
// Saída
|
||||
int16_t output[OUTPUT_SIZE];
|
||||
|
||||
// Multiplicação da matriz: output = weights * input + bias
|
||||
esp_nn_mul_mat_16x8_16(weights, input, bias, output,
|
||||
OUTPUT_SIZE, INPUT_SIZE, /*shift=*/0);
|
||||
|
||||
print_array("Antes da ReLU", output, OUTPUT_SIZE);
|
||||
|
||||
// Aplicar função de ativação ReLU
|
||||
esp_nn_relu_16(output, OUTPUT_SIZE);
|
||||
|
||||
print_array("Depois da ReLU", output, OUTPUT_SIZE);
|
||||
}
|
||||
Reference in new issue
Block a user