Exemple #1
0
def generate_method(debug, test):
    if debug:
        method = {
            'DAE': DAE({'save-model-path': 'DAE', 'pretrained-model-path': None, 'n_epochs': 1, 'batch_size': 256}),
            # 'RNN': RNN({'save-model-path': 'RNN', 'pretrained-model-path': None, 'n_epochs': 1, 'batch_size': 256}),
            # 'Seq2Point': Seq2Point({'save-model-path': 'Seq2Point', 'pretrained-model-path': None, 'n_epochs': 1, 'batch_size': 256}),
            # 'Seq2Seq': Seq2Seq({'save-model-path': 'Seq2Seq', 'pretraiTruened-model-path': None, 'n_epochs': 1, 'batch_size': 256}),
            # 'GRU': WindowGRU({'save-model-path': 'GRU', 'pretrained-model-path': None, 'n_epochs': 1, 'batch_size': 256}),
        }
    else:
        method = {
            'DAE': DAE({'save-model-path': 'DAE', 'pretrained-model-path': None}),
            'RNN': RNN({'save-model-path': 'RNN', 'pretrained-model-path': None}),
            'Seq2Point': Seq2Point({'save-model-path': 'Seq2Point', 'pretrained-model-path': None}),
            'Seq2Seq': Seq2Seq({'save-model-path': 'Seq2Seq', 'pretrained-model-path': None}),
            'GRU': WindowGRU({'save-model-path': 'GRU', 'pretrained-model-path': None}),
        }
    if test:
        method = {
            'DAE': DAE({'save-model-path': 'DAE', 'pretrained-model-path': 'DAE', 'batch_size': 256}),
            'RNN': RNN({'save-model-path': 'RNN', 'pretrained-model-path': 'RNN', 'batch_size': 256}),
            'Seq2Point': Seq2Point(
                {'save-model-path': 'Seq2Point', 'pretrained-model-path': 'Seq2Point', 'batch_size': 256}),
            'Seq2Seq': Seq2Seq({'save-model-path': 'Seq2Seq', 'pretrained-model-path': 'Seq2Seq', 'batch_size': 256}),
            'GRU': WindowGRU({'save-model-path': 'GRU', 'pretrained-model-path': 'GRU', 'batch_size': 256}),
        }
    return method
Exemple #2
0
from disaggregate import ADAE, DAE, Seq2Point, Seq2Seq, WindowGRU, RNN
import warnings
warnings.filterwarnings("ignore")

path = 'D:/workspace/nilm/data/redd_data.h5'
# path = 'D:/workspace/nilm/code/databank/redd_data.h5'


debug = False
test = False

if(debug):
    method = {
        'DAE': DAE({'save-model-path': 'DAE', 'pretrained-model-path': None, 'n_epochs': 1, 'batch_size': 256}),
        'RNN': RNN({'save-model-path': 'RNN', 'pretrained-model-path': None, 'n_epochs': 1, 'batch_size': 256}),
        'Seq2Point': Seq2Point({'save-model-path': 'Seq2Point', 'pretrained-model-path': None, 'n_epochs': 1, 'batch_size': 256}),
        'Seq2Seq': Seq2Seq({'save-model-path': 'Seq2Seq', 'pretrained-model-path': None, 'n_epochs': 1, 'batch_size': 256}),
        'GRU': WindowGRU({'save-model-path': 'GRU', 'pretrained-model-path': None, 'n_epochs': 1, 'batch_size': 256}),
    }
else:
    method = {
        'DAE': DAE({'save-model-path': 'DAE', 'pretrained-model-path': None}),
        'RNN': RNN({'save-model-path': 'RNN', 'pretrained-model-path': None}),
        'Seq2Point': Seq2Point({'save-model-path': 'Seq2Point', 'pretrained-model-path': None}),
        'Seq2Seq': Seq2Seq({'save-model-path': 'Seq2Seq', 'pretrained-model-path': None}),
        'GRU': WindowGRU({'save-model-path': 'GRU', 'pretrained-model-path': None}),
    }
if test:
    method = {
        'DAE': DAE({'save-model-path': 'DAE', 'pretrained-model-path': 'DAE'}),
        'RNN': RNN({'save-model-path': 'RNN', 'pretrained-model-path': 'RNN'}),
Exemple #3
0
    }
else:
    method = {
        'DAE':
        DAE({
            'save-model-path': 'DAE',
            'pretrained-model-path': None
        }),
        'RNN':
        RNN({
            'save-model-path': 'RNN',
            'pretrained-model-path': None
        }),
        'Seq2Point':
        Seq2Point({
            'save-model-path': 'Seq2Point',
            'pretrained-model-path': None
        }),
        'Seq2Seq':
        Seq2Seq({
            'save-model-path': 'Seq2Seq',
            'pretrained-model-path': None
        }),
        'GRU':
        WindowGRU({
            'save-model-path': 'GRU',
            'pretrained-model-path': None
        }),
    }
if test:
    method = {
        'DAE':