def simple_euler_dof2_dcv2_smallnetv5(isRun=False, gradClip=10, stepsize=20000, base_lr=0.001, gamma=0.5, deviceId=0): posePrms = slu.PosePrms(maxRot=90, simpleRot=True, dof=2) dPrms = sev2.get_data_prms(lbPrms=posePrms) nwFn = sev2.process_net_prms nwArgs = {'ncpu': 0, 'baseNetDefProto': 'smallnet-v5_window_siamese_fc5'} solFn = mec.get_default_solver_prms solArgs = { 'dbFile': DEF_DB % 'sol', 'clip_gradients': gradClip, 'stepsize': stepsize, 'base_lr': base_lr, 'gamma': gamma } cPrms = mec.get_caffe_prms(nwFn=nwFn, nwPrms=nwArgs, solFn=solFn, solPrms=solArgs) exp = mec.CaffeSolverExperiment(dPrms, cPrms, netDefFn=sev2.make_net_def, isLog=True) if isRun: exp.make(deviceId=deviceId) exp.run() return exp
def get_data_prms(dbFile=DEF_DB % 'data', lbPrms=None, tvPrms=None, **kwargs): if lbPrms is None: lbPrms = slu.PosePrms() if tvPrms is None: tvPrms = get_trainval_split_prms() dArgs = mec.edict() dArgs.dataset = 'dc-v2' dArgs.lbStr = lbPrms.get_lbstr() dArgs.tvStr = tvPrms.pStr dArgs.isAlign = True allKeys = dArgs.keys() dArgs = mpu.get_defaults(kwargs, dArgs) dArgs['expStr'] = mec.get_sql_id(dbFile, dArgs) dArgs['splitPrms'] = tvPrms dArgs['lbPrms'] = lbPrms dArgs['paths'] = get_paths(dArgs) return dArgs
def simple_quat_dof5_dcv2_doublefcv1_l2loss(isRun=False, gradClip=10, stepsize=20000, base_lr=0.001, gamma=0.5, deviceId=0, readSingleGrp=False, ncpu=0, resumeIter=None): posePrms = slu.PosePrms(maxRot=90, simpleRot=False, dof=5, nrmlz=True, angleType='quat') dPrms = sev2.get_data_prms(lbPrms=posePrms) nwFn = sev2.process_net_prms nwArgs = { 'ncpu': ncpu, 'baseNetDefProto': 'doublefc-v1_window_siamese_fc6', 'lossNetDefProto': 'pose_loss_layers', 'readSingleGrp': readSingleGrp } solFn = mec.get_default_solver_prms solArgs = { 'dbFile': DEF_DB % 'sol', 'clip_gradients': gradClip, 'stepsize': stepsize, 'base_lr': base_lr, 'gamma': gamma } cPrms = mec.get_caffe_prms(nwFn=nwFn, nwPrms=nwArgs, solFn=solFn, solPrms=solArgs, resumeIter=resumeIter) exp = mec.CaffeSolverExperiment(dPrms, cPrms, netDefFn=sev2.make_net_def, isLog=True) if isRun: exp.make(deviceId=deviceId) exp.run() return exp
def setup_experiment_demo(debugMode=False, isRun=False): posePrms = slu.PosePrms() dPrms = get_data_prms(lbPrms=posePrms) nwFn = process_net_prms if debugMode: ncpu = 0 else: ncpu = 2 nwArgs = {'ncpu': ncpu} solFn = mec.get_default_solver_prms solArgs = {'dbFile': DEF_DB % 'sol', 'clip_gradients': 10} cPrms = mec.get_caffe_prms(nwFn=nwFn, nwPrms=nwArgs, solFn=solFn, solPrms=solArgs) exp = mec.CaffeSolverExperiment(dPrms, cPrms, netDefFn=make_net_def, isLog=True) if isRun: exp.make() exp.run() return exp
def simple_euler_dof2_dcv2_doublefcv1_diff_no_common_fc( isRun=False, gradClip=30, stepsize=60000, base_lr=0.001, gamma=0.1, deviceId=0, resumeIter=None): posePrms = slu.PosePrms(maxRot=90, simpleRot=True, dof=2) dPrms = sev2.get_data_prms(lbPrms=posePrms) nwFn = sev2.process_net_prms nwArgs = { 'ncpu': 0, 'baseNetDefProto': 'doublefc-v1_window_siamese_fc6_diff_no-common-fc' } solFn = mec.get_default_solver_prms solArgs = { 'dbFile': DEF_DB % 'sol', 'clip_gradients': gradClip, 'stepsize': stepsize, 'base_lr': base_lr, 'gamma': gamma } cPrms = mec.get_caffe_prms(nwFn=nwFn, nwPrms=nwArgs, solFn=solFn, solPrms=solArgs, resumeIter=resumeIter) exp = mec.CaffeSolverExperiment(dPrms, cPrms, netDefFn=sev2.make_net_def, isLog=True) if isRun: exp.make(deviceId=deviceId) exp.run() return exp
def demo_make_test(): posePrms = slu.PosePrms(maxRot=90, simpleRot=True, dof=2) dPrms = sev2.get_data_prms(lbPrms=posePrms) make_test_set(dPrms)