Skip to content

Instantly share code, notes, and snippets.

class Arithmetic(GrammarDataSet):
open_par = '('
close_par = ')'
def __init__(self, maxnest=4, maxlength=50, size=250,
vars=None, operators=None):
"""Initialize an Arithmetic objective with a nesting depth of at most
maxnest, words up to a size of length and size items in the training and
test datasets.
double* derivs_p = get_derivatives();
for (int i = 0; i < outdim; i++)
{
for (int j = 0; j < indim; j++)
{
derivs_p[i * indim + j] += source_p[i] * input_p[j];
}
}
import pylab
import scipy
pylab.clf()
pylab.imshow(scipy.eye(100, 100))
pylab.Rectangle((10, 10), 20, 20, fill=True)
pylab.show()
import pylab
import scipy
pylab.clf()
pylab.imshow(scipy.eye(100, 100))
pylab.Rectangle((10, 10), 20, 20, fill=True)
pylab.show()
def plot_prediction(result, sample, target, filename=None):
sample.shape = 512, 512
fig = pylab.figure()
plot = fig.add_subplot(111)
pylab.imshow(sample, cmap=pylab.cm.gray)
denormalize = lambda x, rng: (x + 1.) * rng / 2
def getcoords(normalized):
#include <vector>
int main(int argc, char **argv)
{
std::vector<const double*> blubber;
blubber.push_back(0);
blubber.push_back(0);
blubber.push_back(0);
blubber.push_back(0);
std::vector<const double*>::const_reverse_iterator output_iter;
# -*- coding: utf-8 -*-
"""This module is an evolino implementation alternative to the current
PyBrain one."""
__author__ = 'Justin S Bayer, [email protected]'
import scipy as sp
{'coords': False}
input filename inputs-bam.txt
data filename bla.nc
reading 1 data files
Sample file: 0-sample.arr
Target file: 0-target.arr
16384
createNcDim: numSeqs 1
createNcDim: numTimesteps 262144
createNcDim: inputPattSize 1
Subsequently, we attempt to solve the following task:
SphereFunction
fmin (array([ -1.96718823e-05, 3.87550180e-05, 2.20982432e-05]), 2.3772667291947832e-09)
CMA (array([ 5.40759177e-07, -7.63606211e-06, -3.86932335e-06]), 7.3573528137241625e-11)
NES (array([ -1.37096352e-04, -1.85657434e-05, 2.32781642e-05]), 1.9681969576692007e-08)
FEM (array([ -2.41800088e-05, -1.40246886e-05, 3.84758011e-05]), 2.2617519878581808e-09)
Finite Differences (array([-0.06813254, -0.02855401, -0.03060486]), 0.006394031410795596)
SPSA (array([-1.42769912, 0.7243347 , -1.59992138]), 5.1227339471421285)
PGPE (array([ -3.93519227e-06, -4.87915817e-06, 5.98595533e-06]), 7.5123583874849896e-11)
HillClimber (array([ 0.00796732, 0.00024254, 0.0114661 ]), 0.00019500840909555657)
Neueste Änderungen vom central holen
$ git fetch central
In entfernten Branch central/master wechseln
$ git checkout central/master
Lokale Kopie davon erzeugen