コード例 #1
0
                      sortBounds     = 10,
                      nInits         = 2,
                      nNeuronsPerJob = 1,
                      nInitsPerJob   = 2,
                      nSortsPerJob   = 10,
                      compress       = True )

from TuningTools.CrossValid import CrossValid, CrossValidArchieve
crossValid = CrossValid(nSorts = 50,
                        nBoxes = 10,
                        nTrain = 6, 
                        nValid = 4,
                        #nTest=args.nTest,
                        #seed=args.seed,
                        #level=args.output_level
                        )
place = CrossValidArchieve( 'crossValid_citest0', 
                            crossValid = crossValid,
                            ).save( True )


from TuningTools.PreProc import *
#ppCol = PreProcCollection( PreProcChain( MapStd() ) )
ppCol = PreProcChain( Norm1() )
from TuningTools.TuningJob import fixPPCol
ppCol = fixPPCol(ppCol)
place = PreProcArchieve( 'ppFile_citest0', ppCol = ppCol ).save()
import sys,os
sys.exit(os.EX_OK) # code 0, all ok

コード例 #2
0
          inst = tClass( *class_attr_parsed )
        else:
          m3 = dict_args.search(str_)
          if m3:
            d = m3.group(1)
            kwargs = ast.literal_eval( m3.group(1) )
            inst = tClass( **kwargs )
          else:
            inst = tClass()
      else:
        inst = tClass()
      # Substitute the instance with the string
      if parent is not None:
        parent[idx] = inst
      else: 
        ppCol = inst
    else:
      raise RuntimeError("Couldn't parse '%s'" % str_)
  from TuningTools.TuningJob import fixPPCol
  pp_nSorts = args.pp_nSorts
  if pp_nSorts is NotSet:
    try:
      pp_nSorts  = crossValid.nSorts()
    except NameError:
      pass
  ppCol = fixPPCol( ppCol, pp_nSorts, args.pp_nEtaBins, args.pp_nEtBins )
  place = PreProcArchieve( args.preProcOutputFile, ppCol = ppCol ).save( args.compress )
  logger.info('Created pre-processing file at path %s', place )

logger.info('Finished creating tuning job files.')
コード例 #3
0
from TuningTools.PreProc import *
ppCol = PreProcChain([Norm1(),StackedAutoEncoder(hidden_neurons=[100]),StackedAutoEncoder(hidden_neurons=[80]),StackedAutoEncoder(hidden_neurons=[60])] )  
from TuningTools.TuningJob import fixPPCol
ppCol = fixPPCol(ppCol)
place = PreProcArchieve( 'teste_SAE_ppFile', ppCol = ppCol ).save()
コード例 #4
0
ファイル: test.py プロジェクト: kaducovas/ringer

from TuningTools.TuningJob import fixPPCol
#ppCol = fixPPCol(ppCol)
#place = PreProcArchieve( 'ppFile', ppCol = ppCol ).save()
import numpy as np
A =  np.random.rand(3,5)
B =  np.random.rand(3,5)

print type(ppCol1)
print type(ppCol1[0])


from RingerCore import *




test = PreProcChain([ PreProcMerge(ppChains=[ppCol1, ppCol1]) ])
test = fixPPCol(test)
place = PreProcArchieve( 'ppFile', ppCol = test ).save()


with PreProcArchieve(place) as ppCol:
  print 'donw'
  print ppCol
  ppCol[0][0][0]([[A,A],[B,B]])