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

I'm not good at programming. I hope you can give me some guidance #35

Open
chowlay1996 opened this issue Jun 29, 2020 · 5 comments
Open
Labels

Comments

@chowlay1996
Copy link

Hello!
Thank you for your contribution. I would like to know how to add loss visualization function in RNN network. I would like to observe its fitting

@OdysseasKr
Copy link
Owner

OdysseasKr commented Jun 29, 2020

Hello!

Since the models are built using Keras, you can get easily get the loss value per epoch. The model.fit function returns a History object containing all losses. You can then plot them with a few modifications in the code.

You can take a look at this blog post from Machine Learning Mastery that explains the whole process.

@chowlay1996
Copy link
Author

Thank you very much

@chowlay1996
Copy link
Author

I have learned this blog, but model.fit () requires numpy Array or List for data types of X and y. Train_mains, train_meter in your code does not belong to this type. How can I transform the type

@OdysseasKr
Copy link
Owner

In order to work with the Keras function, you need to modify the RNN disaggregator, not just the code that calls it.

Take a look at https://github.com/OdysseasKr/neural-disaggregator/blob/master/RNN/rnndisaggregator.py#L95 for the RNN.

This line

self.model.fit(mainchunk, meterchunk, epochs=epochs, batch_size=batch_size, shuffle=True)

receives two numpy arrays (mainchunk and meterchunk). This function returns the history object that you can use.

@OdysseasKr OdysseasKr reopened this Jun 29, 2020
@chowlay1996
Copy link
Author

I'd appreciate you for your help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants