DEV Community

zahash
zahash

Posted on

General Purpose Tensorflow Model Trainer For CSV Files

I made a general-purpose Python notebook to train TensorFlow models on any given CSV file.

you just need to specify the dataset path, label name, batch size, and task (regression or classification).

things like the number of layers, number of nodes in each layer, number of output nodes, loss functions, model checkpointing, early stopping are taken care of.

All the preprocessing that you will ever need is built right into the layers of the model so that the model just accepts raw data and preprocesses it by itself without the need to have separate functions. (makes deployment a hell of a lot easier)

The code can handle very large CSV files too. (greater than 10GB)

Keras-tuner is used to determine the optimal kernel regularization values and activation functions.

https://colab.research.google.com/drive/1FzSQQR5ta7UGUNJZVYO8GjvNNSWjes3N?usp=sharing

I agree that it's not a "one size fits all" but you never know when it might be useful.

Top comments (0)