Commit 2d7eb83
committed
feat(v0.3.0): API Keras, Adam/RMSprop, callbacks, BatchNorm
BREAKING CHANGE: refactor mayor de la librería.
Nuevo:
- Optimizers: Adam, RMSprop, AdaGrad + gradient clipping (clip_norm/clip_value)
- Layer: BatchNormalization con running stats
- Callbacks: EarlyStopping, ModelCheckpoint, ReduceLROnPlateau, History
- Regularizers: L1, L2, L1L2 sobre kernels
- Initializers: HeNormal, XavierNormal/Uniform, Zeros, Ones
- Metrics: BinaryAccuracy, CategoricalAccuracy, R2Score, RMSE, MAE
- Activations: ELU, Tanh con caching del forward
- Losses: Huber, MAE, SparseCategoricalCrossEntropy
- Utils: train_test_split, to_categorical, normalize, standardize
API estilo Keras:
- model.compile(optimizer, loss, metrics)
- model.fit(... validation_split, callbacks, verbose)
- model.evaluate(), predict_classes(), summary()
- Aceptación por string: optimizer='adam', loss='bce', activation='relu'
- Inferencia automática de input_size en capas posteriores
Producción:
- save_weights/load_weights en .npz portable
- get_weights/set_weights para serving custom
- Logger estructurado, verbose 0/1/2
Tests:
- 51 tests cubriendo todos los componentes
- test_gradient_check.py valida backprop con diferencias finitas
- CI matriz Python 3.8/3.10/3.12
Fix:
- MSE.derivative ahora divide por y.size (consistente con np.mean)
Migración: modelos .pkl previos no son compatibles. Re-entrena
y guarda con save_weights('.npz') para portabilidad futura.1 parent 144a7e6 commit 2d7eb83
22 files changed
Lines changed: 2646 additions & 395 deletions
File tree
- .github/workflows
- examples
- src
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
12 | 15 | | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
4 | 8 | | |
5 | | - | |
| 9 | + | |
6 | 10 | | |
7 | 11 | | |
8 | 12 | | |
| 13 | + | |
9 | 14 | | |
10 | | - | |
11 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
0 commit comments