Code Monkey home page Code Monkey logo

renormalization's Introduction

renormalization

  • Requirements
    • numpy, pytorch
  • For overview of code + some plots, check out main.ipynb
  • Generate Ising model data:
    • run python generate_data.py
    • Place correlated .npy file in correct temperature directory
  • Create uncorrelated samples in supervised_convnet/generate_uncorrelated_data.py
    • Set data variable to be path of the Ising model data (of each temperature)
    • Place uncorrelated .npy file in correct temperature directory
  • Train neural network to distinguish between correlated/uncorrelated samples in temperature directory e.g. supervised_convnet/t_1/train.py
    • Make sure both correlated and uncorrelated .npy file in supervised_convnet/t_1
  • Neural network architecture in supervised_convnet/supervised_convnet.py
    • Also contains IsingDataset class for pytorch data set loading

renormalization's People

Contributors

anhhuyalex avatar

renormalization's Issues

Mon Feb 26 exps

coarse grain the network

  • retry with tanh and relu and see if i get zero train loss

do shuffling svd exps & pca regression:

MNIST: Classification with nonlinearity

MNIST: Classification with nonlinearity
Try experiment with L2 set to what we have now and an experiment without L2
Start with easy nonlinearities like tanh and then try ReLU

for k in {1..14}; do python -u mnist_classification.py ./data --coarsegrain_blocksize $k --num_hidden_features $i --num_train_samples $j --fileprefix tanhlr0.1_mnistAUG05 --nonlinearity tanh --train_method gradient_descent --epochs 150 --lr 0.1 ; done

for k in {1..14}; do python -u mnist_classification.py ./data --coarsegrain_blocksize $k --num_hidden_features $i --num_train_samples $j --fileprefix tanhlr0.1_wd0_mnistAUG06 --nonlinearity tanh --train_method gradient_descent --epochs 150 --lr 0.1 --wd 0.0000000000000000000000001; done

CIFAR: classification with nonlinearity

for k in 1 2 3 4 5 6 7 8 9 11 17; do python -u cifar_classification_randomfeatures.py ./data  --coarsegrain_blocksize  $k --num_hidden_features $i --num_train_samples $j  --fileprefix linelr0.001_wd1em5_cifarAUG15 --nonlinearity line --train_method gradient_descent --epochs 150 --lr 0.001; done #    --wd 0.0000000000000000000000001

for k in 1 2 3 4 5 6 7 8 9 11 17; do python -u cifar_classification_randomfeatures.py ./data  --coarsegrain_blocksize  $k --num_hidden_features $i --num_train_samples $j  --fileprefix tanhlr0.1_wd1em5_cifarAUG15 --nonlinearity tanh --train_method gradient_descent --epochs 150 --lr 0.1; done #    --wd 0.0000000000000000000000001

Whole network

for k in 1 2 3 4 5 6 7 8 9 11 17; do python -u cifar_classification_randomfeatures_wholenetwork.py ./data  --coarsegrain_blocksize  $k --num_hidden_features $i --num_train_samples $j  --fileprefix linelr0.1_wd1em5_cifar_fullnetAUG16 --nonlinearity line--train_method gradient_descent --epochs 150 --lr 0.1; done #    --wd 0.0000000000000000000000001


for k in 1 2 3 4 5 6 7 8 9 11 17; do python -u cifar_classification_randomfeatures_wholenetwork.py ./data  --coarsegrain_blocksize  $k --num_hidden_features $i --num_train_samples $j  --fileprefix tanhlr0.1_wd1em5_cifar_fullnetAUG16 --nonlinearity tanh --train_method gradient_descent --epochs 150 --lr 0.1; done #    --wd 0.0000000000000000000000001

for k in 1 2 3 4 5 6 7 8 9 11 17; do python -u cifar_classification_randomfeatures_wholenetwork.py ./data  --coarsegrain_blocksize  $k --num_hidden_features $i --num_train_samples $j  --fileprefix relulr0.001_wd1em5_cifar_fullnetAUG16 --nonlinearity relu --train_method gradient_descent --epochs 150 --lr 0.001; done #    --wd 0.0000000000000000000000001

SVD shuffling exp.

principle component with decorrelated

shuffle the values of principal components:

each sample now has its

instead of zeroing them out, independently shuffle across all data points, keep the top k dimensions
make a plot of no. of dimensions kept
image

fractional coarse-graining

for k in 28 27 25 23 21 19 17 15 13 11 9 7 5 3 1; do python -u mnist_classification_wholenetwork.py ./data --target_size $k --num_hidden_features $j --num_train_samples 60000 --fileprefix relulr0.1_mnist_fullnet_fractional_cg_DEC04 --lr 0.1 --nonlinearity relu --epochs 150 --upsample; done # --wd 0.0000000000000000000000001

for k in 28 27 25 23 21 19 17 15 13 11 9 7 5 3 1; do python -u mnist_classification_wholenetwork.py ./data --target_size $k --num_hidden_features $j --num_train_samples 60000 --fileprefix linelr0.1_mnist_fullnet_fractional_cg_DEC04 --lr 0.1 --nonlinearity relu --epochs 150 --upsample; done # --wd 0.0000000000000000000000001

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.