Ejemplo n.º 1
0
            'type': DimshuffleLayer,
            'pattern': (0, 2, 1)
        },
        {
            'type': Conv1DLayer,
            'num_filters': 80,
            'filter_length': 5,
            'stride': 5,
            'nonlinearity': sigmoid
        },
        {
            'type': DimshuffleLayer,
            'pattern': (0, 2, 1)
        },
        {
            'type': LSTMLayer,
            'num_units': 80,
            'W_in_to_cell': Uniform(5)
        },
        {
            'type': DenseLayer,
            'num_units': source.n_outputs,
            'nonlinearity': sigmoid
        }
    ]
)

net.print_net()
net.compile()
net.fit()
Ejemplo n.º 2
0
        },
        {
            'type': DimshuffleLayer,
            'pattern': (0, 2, 1)
        },
        {
            'type': Conv1DLayer,
            'num_filters': 80,
            'filter_length': 5,
            'stride': 5,
            'nonlinearity': sigmoid
        },
        {
            'type': DimshuffleLayer,
            'pattern': (0, 2, 1)
        },
        {
            'type': LSTMLayer,
            'num_units': 80,
            'W_in_to_cell': Uniform(5)
        },
        {
            'type': DenseLayer,
            'num_units': source.n_outputs,
            'nonlinearity': sigmoid
        }
    ])
net.print_net()
net.compile()
net.fit()
Ejemplo n.º 3
0
from __future__ import print_function, division
from neuralnilm import Net, ToySource
from lasagne.nonlinearities import sigmoid

source = ToySource(seq_length=300, n_seq_per_batch=30)

net = Net(source=source,
          n_cells_per_hidden_layer=[10],
          output_nonlinearity=sigmoid,
          learning_rate=1e-1)

net.fit(n_iterations=1000)
net.plot_costs()
net.plot_estimates()
Ejemplo n.º 4
0
from __future__ import print_function, division
from neuralnilm import Net, RealApplianceSource
from lasagne.nonlinearities import sigmoid

source = RealApplianceSource(
    '/data/dk3810/ukdale.h5', 
    ['fridge freezer', 'hair straighteners', 'television'],
    max_input_power=1000, max_output_power=300,
    window=("2013-06-01", "2014-06-01")
)

net = Net(
    source=source,
    n_cells_per_hidden_layer=[50,50,50],
    output_nonlinearity=sigmoid,
    learning_rate=1e-1,
    n_dense_cells_per_layer=50
)

net.fit(n_iterations=1600)
net.plot_costs()
net.plot_estimates()
Ejemplo n.º 5
0
from __future__ import print_function, division
from neuralnilm import Net, RealApplianceSource
from lasagne.nonlinearities import sigmoid

source = RealApplianceSource(
    '/data/dk3810/ukdale.h5',
    ['fridge freezer', 'hair straighteners', 'television'],
    max_input_power=1000,
    max_output_power=300,
    window=("2013-06-01", "2014-06-01"))

net = Net(source=source,
          n_cells_per_hidden_layer=[50, 50, 50],
          output_nonlinearity=sigmoid,
          learning_rate=1e-1,
          n_dense_cells_per_layer=50)

net.fit(n_iterations=1600)
net.plot_costs()
net.plot_estimates()
Ejemplo n.º 6
0
from __future__ import print_function, division
from neuralnilm import Net, ToySource
from lasagne.nonlinearities import sigmoid

source = ToySource(
    seq_length=300,
    n_seq_per_batch=30
)

net = Net(
    source=source,
    n_cells_per_hidden_layer=[10],
    output_nonlinearity=sigmoid,
    learning_rate=1e-1
)

net.fit(n_iterations=1000)
net.plot_costs()
net.plot_estimates()