示例#1
0
from os.path import join

import numpy as np

from pycog             import RNN
from pycog.figtools    import gradient, mpl, Figure
from pycog.utils       import get_here, get_parent
from examples.analysis import rdm

import paper

#=========================================================================================
# Paths
#=========================================================================================

here     = get_here(__file__)
base     = get_parent(here)
figspath = join(here, 'figs')

modelfile = join(base, 'examples', 'models', 'rdm_dense.py')
savefile  = join(base, 'examples', 'work', 'data', 'rdm_dense', 'rdm_dense.pkl')

#=========================================================================================

m = imp.load_source('model', modelfile)

rnn = RNN(savefile, {'dt': 0.5}, verbose=False)

trial_func = m.generate_trial
trial_args = {
    'name':   'test',
import os
from   os.path import join

import numpy as np

from pycog.figtools    import apply_alpha, Figure
from pycog.utils       import get_here, get_parent
from examples.analysis import mante

import paper

#=========================================================================================
# Setup
#=========================================================================================

here     = get_here(__file__)
base     = get_parent(here)
figspath = join(here, 'figs')

trialsfile  = join(paper.scratchpath, 'mante_areas', 'trials', 'mante_areas_trials.pkl')
sortedfile  = join(paper.scratchpath, 'mante_areas', 'trials', 'mante_areas_sorted.pkl')
betafile    = join(base, 'examples', 'work', 'data', 'mante_areas',
                   'mante_areas_beta.pkl')

units = [10, 23, 25, 28]

#=========================================================================================
# Figure setup
#=========================================================================================

w   = 7.5
示例#3
0
文件: do.py 项目: alienhc/pycog
ppn = a.ppn
gpus = a.gpus
dt = a.dt
dt_save = a.dt_save

print("MODELFILE: " + str(modelfile))
print("ACTION:    " + str(action))
print("ARGS:      " + str(args))
print("SEED:      " + str(seed))

#=========================================================================================
# Setup paths
#=========================================================================================

# Location of script
here = get_here(__file__)  # eg. '/Users/yuxie/Lab/RNN/pycog/custom'
prefix = os.path.basename(here)  # eg. 'custom'

# Name to use
name = os.path.splitext(os.path.basename(modelfile))[0]  # eg. 'worm_reversal'

# Scratch
scratchroot = os.environ.get('SCRATCH', join(os.path.expanduser('~'),
                                             'scratch'))
# eg. '/Users/yuxie/scratch'
scratchpath = join(scratchroot, 'work', prefix, name)
# eg. '/Users/yuxie/scratch/work/custom/worm_reversal'

# Theano
theanopath = join(scratchpath, 'theano')
# eg. '/Users/yuxie/scratch/work/custom/worm_reversal/theano'