Tensorflow v2 examples of baseline networks.
- python=3.7
- tensorflow=2.2.0
- numpy=1.18.8
- cudatoolkit=10.1.243
- cudnn=7.6.5
- opencv=3.4.2
- tqdm
- mnist (Auto-download): 60000 training images with shape 28x28 and 10000 test images.
- Cifar (Auto-download): 60000 training
Training a simple CNN model with the API fit()
of the tf.Keras
:
Usage: python xxx.py <mode> <gpu> [options]
python main_mini_cnn7layers.py train 0
Test model with test dataset:
python main_mini_cnn7layers.py test 0
python main_custom.py train
tensorboard --logdir ./model_dir --port 16006
# Expore to the network
tensorboard --logdir ./model_dir --port 16006 --host 0.0.0.0
python projector/mnist/main_cnn7layers.py
# With sprite image
python projector/mnist/main_cnn7layers.py -s
Open terminal in projector/mnist/dst_ckpt
and open tensorboard by
tensorboard --logdir ./
Open browser with address: http://localhost:6006/#projector
Results in 2D (MNIST embedding):
Reference:
Dorfer M, Kelz R, Widmer G. Deep linear discriminant analysis[J]. arXiv preprint arXiv:1511.04707, 2015.
python main_lda.py train