TensorFlow utilities for layers, metrics, shaping, sampling, and model building blocks.
pip install -U mlableimporttensorflowastfimportmlable.layers.shapingimportmlable.metricsx=tf.ones(shape=(2, 4, 8))
y=mlable.layers.shaping.Divide(axis=-1, factor=4, insert=True)(x)
metric=mlable.metrics.CategoricalGroupAccuracy(group=4)
score=metric(y_true=tf.one_hot([[1, 2, 3, 4]], depth=8), y_pred=tf.one_hot([[1, 2, 0, 4]], depth=8))Detailed usage documentation is available under docs/sources/:
docs/sources/layers/shaping.mddocs/sources/layers/embedding.mddocs/sources/layers/transformer.mddocs/sources/metrics/group_accuracy.mddocs/sources/index.md
Andrej Karpathy reconnected my ML synapses with micrograd.
Licensed under the aGPLv3.