/nn_project1

Homework project for neural network

Primary LanguagePython

Using Multi layer classifier to fit non-linear models.

Requirements

  • Linux / Windows
  • python 3.7+
  • Numpy
  • matplotlib 3.3.2

Install

# for development
python setup.py develop

# for deploy
python setup.py install

Usage

For more details about arguments, you can refer to parse_args in main.py.

A simple command to run the step is shown as below.

python main.py 10000 --verbose --seed 0 --draw

For testing the initialization model without training, run the following command.

python main.py 10000 --total_epochs 0 --verbose --seed 0 --draw

Results


prediction before training

Loss during training

prediction after training

Docs

Words, PDF

Features

  • Pre-commit with isort, yapf, flake8, trailing-whitespace, markdown, etc.
  • Setup script.

Development Guide

# install formatter
pip install yapf

# install pre-commit tool
pip install pre-commit
pre-commit install

# manually check all files
pre-commit run --all-files