Exemplo n.º 1
0
                                    train=trainName,
                                    syr=2015,
                                    eyr=2015,
                                    var='varLst_Forcing',
                                    varC='varConstLst_Noah',
                                    dr=0.6,
                                    modelOpt='relu',
                                    model='cudnn',
                                    loss='sigma')
    k = 0
    for j, i in zip(C1Lst, C2Lst):
        opt['out'] = trainName + \
            '_y15_Forcing_dr60_invGamma_'+str(j)+'_'+str(i)
        opt['lossPrior'] = 'invGamma+' + str(j) + '+' + str(i)
        runTrainLSTM.runCmdLine(opt=opt,
                                cudaID=k % 3,
                                screenName=opt['lossPrior'])
        # rnnSMAP.funLSTM.trainLSTM(opt)
        k = k + 1

#################################################
if 'test' in doOpt:
    torch.cuda.empty_cache()
    dsLst = list()
    statErrLst = list()
    statSigmaLst = list()
    statConfLst = list()
    statNormLst = list()
    for k in range(0, nCase):
        out = outLst[k]
        ds = rnnSMAP.classDB.DatasetPost(rootDB=rootDB,
Exemplo n.º 2
0
        rootOut=rootOut,
        syr=2015,
        eyr=2015,
        var='varLst_Forcing',
        varC='varConstLst_Noah',
        train='CONUSv4f1',
        dr=0.5,
        modelOpt='relu',
        model='cudnn',
        loss='sigma',
    )
    for k in range(0, len(drLst)):
        opt['dr'] = drLst[k]
        opt['out'] = 'CONUSv4f1_y15_Forcing_dr' + drStrLst[k]
        cudaID = k % 3
        runTrainLSTM.runCmdLine(opt=opt, cudaID=cudaID, screenName=opt['out'])

#################################################
if 'test' in doOpt:
    predField = 'LSTM'
    targetField = 'SMAP'
    dsLst = list()
    statErrLst = list()
    statSigmaLst = list()
    statConfLst = list()
    for k in range(0, len(drStrLst)):
        if drStrLst[k] is '50':
            out = 'CONUSv4f1_y15_Forcing'
        else:
            out = 'CONUSv4f1_y15_Forcing_dr' + drStrLst[k]
        testName = testName
Exemplo n.º 3
0
                                rootOut=rnnSMAP.kPath['OutSigma_L3_NA'],
                                syr=2015,
                                eyr=2015,
                                var='varLst_soilM',
                                varC='varConstLst_Noah',
                                dr=0.5,
                                modelOpt='relu',
                                model='cudnn',
                                loss='sigma')
cudaIdLst = [1, 2]
for k in range(0, len(hucLst)):
    trainName = hucLst[k] + '_v2f1'
    opt['train'] = trainName
    opt['out'] = trainName + '_y15_soilM'
    print(trainName)
    runTrainLSTM.runCmdLine(opt=opt, cudaID=cudaIdLst[k], screenName=trainName)

#################################################
# Test
rootOut = rnnSMAP.kPath['OutSigma_L3_NA']
rootDB = rnnSMAP.kPath['DB_L3_NA']
dsTuple = ([], [], [])
dsTuple2 = ([], [])
for k in range(0, len(hucLst)):
    trainName = hucLst[k] + '_v2f1'
    out = trainName + '_y15_soilM'
    rootOut = rnnSMAP.kPath['OutSigma_L3_NA']

    outLst = [
        trainName + '_y15_soilM', trainName + '_y15_soilM',
        'CONUSv2f1_y15_soilM'