Giter VIP home page Giter VIP logo

mlmono's Introduction

mlmono

Mono repo for all machine learning work. For now this package rely on the tensorflow estimator feature.

Adding a model

Models should all go under the directory models/.

  1. Write a class that inherits from MLGraph
class CNN(MLGraph):
    def __init__(self):
        # define the variables that you want to interface with the outside
        # mostly for debugging
        # input and output are the default names for the forward model as defined in `MLGraph`
        # self.input = None
        # self.output = None
  1. Defined a forward-pass function for the model
class CNN(MLGraph):
    ...
    def add_forward_pass(self, features):
        # define the forward model
        # returns the prediction output
        # self.input and self.output must now refer to a variable node
  1. Write a config file

Config files are YAML files that describes a test case. They technically can be anywhere but we suggest that you put them under configs/ and keep track of them along with the version controll system. A config file should have at least io > dataset, model and trainer fields. The corresponding modules of the model will be initialized according to the variables under those fields. Refer to the example config for more details.

How to run

Before you can run the script, you usually need to run

python setup.py develop

in order to set up the entry point. This is necessary to make the import paths correct.

The entry script is cli.py so basically you can run the mlmono.cli module in most of the cases.

To train a model

mlmono train --config configs/mnist.yml

To do prediction

mlmono predict --config configs/mnist.yml

How it works

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.