This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
import sys | |
import numpy | |
numpy.seterr(all='ignore') | |
''' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* SdA.cpp (Stacked Denoising Autoencoders) | |
* | |
* @author yusugomori (http://yusugomori.com) | |
* @usage $ g++ SdA.cpp | |
* | |
*/ | |
#include <iostream> | |
#include <math.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
''' | |
Deep Belief Nets (DBN) | |
References : | |
- Y. Bengio, P. Lamblin, D. Popovici, H. Larochelle: Greedy Layer-Wise | |
Training of Deep Networks, Advances in Neural Information Processing | |
Systems 19, 2007 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
Restricted Boltzmann Machine (RBM) | |
References : | |
- Y. Bengio, P. Lamblin, D. Popovici, H. Larochelle: Greedy Layer-Wise | |
Training of Deep Networks, Advances in Neural Information Processing | |
Systems 19, 2007 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
Denoising Autoencoders (dA) | |
References : | |
- P. Vincent, H. Larochelle, Y. Bengio, P.A. Manzagol: Extracting and | |
Composing Robust Features with Denoising Autoencoders, ICML'08, 1096-1103, | |
2008 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
''' | |
Logistic Regression | |
References : | |
- Jason Rennie: Logistic Regression, | |
http://qwone.com/~jason/writing/lr.pdf | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
Stacked Denoising Autoencoders (SdA) | |
References : | |
- P. Vincent, H. Larochelle, Y. Bengio, P.A. Manzagol: Extracting and | |
Composing Robust Features with Denoising Autoencoders, ICML' 08, 1096-1103, | |
2008 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from keras.optimizers import Optimizer | |
from keras.legacy import interfaces | |
from keras import backend as K | |
import tensorflow as tf | |
class Adabound(Optimizer): | |
def __init__(self, lr=0.001, | |
beta_1=0.9, beta_2=0.999, | |
gamma=0.001, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import subprocess | |
import random | |
import numpy as np | |
import torch | |
import torch.nn as nn | |
import torch.optim as optimizers | |
from torch.autograd import Variable | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// $ scalac DBN.scala | |
// $ scala DBN | |
import scala.util.Random | |
import scala.math | |
class RBM(val N: Int, val n_visible: Int, val n_hidden: Int, | |
_W: Array[Array[Double]]=null, _hbias: Array[Double]=null, _vbias: Array[Double]=null, |
NewerOlder