Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to load the weights - pretrained? #81

Open
ccruzalegui opened this issue Apr 24, 2023 · 0 comments
Open

how to load the weights - pretrained? #81

ccruzalegui opened this issue Apr 24, 2023 · 0 comments

Comments

@ccruzalegui
Copy link

ccruzalegui commented Apr 24, 2023

I would like to get some help here. I want to use the "weights" of my trained appliance (in this case the boiler of House 4). The dictionary seems to be well defined, but whatever path file I write in the "pre-trained" line is accepted, and my API runs anyway, what makes me think it is actually to taking the trained h5 file. This is very urgent for me since I am running the experiments in a standard PC (no GPU), and otherwise the experiments take forever.

I took the "pre-trained" line from a closed issue in the NILMTK repo here.
Appreciate your support!

ukdale = {
  'power': {
    'mains': ['apparent','active'],
    'appliance': ['apparent','active']
  },
  'sample_rate': 6,
  #'appliances': ['television','kettle', 'boiler', 'freezer', 'washing machine'],
  'appliances': ['boiler'],
  'pre-trained': {'Seq2Point': './Weights/boiler_seq2point-temp-weights-45573.h5'},
  'methods': {
    
      #'WindowGRU':WindowGRU({'n_epochs':1,'batch_size':32}),
      #'RNN':RNN({'n_epochs':1,'batch_size':32}),
      #'DAE':DAE({'n_epochs':1,'batch_size':32}),
      'Seq2Point':Seq2Point({'n_epochs':1,'batch_size':32, 'sequence_length': 99}),
      #'Seq2Seq':Seq2Seq({'n_epochs':1,'batch_size':32}),

      'Mean': Mean({}),
          
  },
   'train': {    
    'datasets': {
            'UK-DALE': {
                'path': './Dataset/ukdale.h5',
                #'path': './Weights/boiler_seq2point-temp-weights-45573.h5',
                'buildings': {
                4: {
                    'start_time': '2013-04-01 00:00:00',
                    'end_time': '2013-04-30 00:00:00'
                },
#                 56: {
#             'start_time': '2015-01-28',
#             'end_time': '2015-01-30'
#           },
            }
                                
            }
            }
    },
    'test': {
    'datasets': {
        'UK-DALE': {
            'path': './Dataset/ukdale.h5',
            'buildings': {
                4: {
                    'start_time': '2013-09-02 00:00:00',
                    'end_time': '2013-09-04 00:00:00'
                },
            }
        }
},
        'metrics':['mae', 'rmse']
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant