Commit d2c057ea authored by Anthony Larcher's avatar Anthony Larcher
Browse files

creation of a nnet module

parent 9a1ccf14
......@@ -29,6 +29,8 @@ useful parameters for speaker verification.
"""
import numpy
import os
PARALLEL_MODULE = 'multiprocessing' # can be , threading, multiprocessing MPI is planned in the future
PARAM_TYPE = numpy.float32
STAT_TYPE = numpy.float64
......@@ -91,6 +93,11 @@ from sidekit.gmm_scoring import gmm_scoring
# Import NNET classes and functions
try:
if THEANO_CONFIG == "gpu":
os.environ['THEANO_FLAGS'] = 'mode=FAST_RUN,device=gpu,floatX=float32'
else:
os.environ['THEANO_FLAGS'] = 'mode=FAST_RUN,device=cpu,floatX=float32'
import theano
from sidekit.nnet.theano_utils import FForwardNetwork
except ImportError:
......
......@@ -26,6 +26,7 @@ Copyright 2014-2016 Anthony Larcher and Sylvain Meignier
:mod:`nnet` provides methods to manage Neural Networks using Theano
"""
from sidekit.nnet.feed_forward import FForwardNetwork
from sidekit.nnet.feed_forward import kaldi_to_hdf5
......
......@@ -40,13 +40,13 @@ import time
import sidekit.frontend
from sidekit.sidekit_io import init_logging
from sidekit import THEANO_CONFIG
# from sidekit import THEANO_CONFIG
from sidekit.sidekit_wrappers import check_path_existance
if THEANO_CONFIG == "gpu":
os.environ['THEANO_FLAGS'] = 'mode=FAST_RUN,device=gpu,floatX=float32'
else:
os.environ['THEANO_FLAGS'] = 'mode=FAST_RUN,device=cpu,floatX=float32'
# if THEANO_CONFIG == "gpu":
# os.environ['THEANO_FLAGS'] = 'mode=FAST_RUN,device=gpu,floatX=float32'
# else:
# os.environ['THEANO_FLAGS'] = 'mode=FAST_RUN,device=cpu,floatX=float32'
import theano
import theano.tensor as T
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment