aeon-toolkit / aeon

A toolkit for machine learning from time series
https://aeon-toolkit.org/
BSD 3-Clause "New" or "Revised" License
1k stars 118 forks source link

[MNT] Remove Reshape layer from Deep Learning Clusterers #1794

Open aadya940 opened 3 months ago

aadya940 commented 3 months ago

Describe the issue

The tf.keras.layers.Reshape was introduced in clustering/deep_learnin to make the input shape of the encoder equal to the output shape of the decoder which is already being tested in test_all_networks.py. So, basically it is unnecessary at the moment.

Suggest a potential alternative/fix

Remove it.

TonyBagnall commented 3 months ago

maybe add some context as to why?

av6-github commented 2 months ago

@TonyBagnall @aadya940 Would you be able to provide more context on this? @aadya940 Is it open for me to solve?

aadya940 commented 2 months ago

@av6-github Yes, go ahead :) Basically, you have to remove the following layer from the clusterer's since this is never actually needed.

https://github.com/aeon-toolkit/aeon/blob/main/aeon/clustering/deep_learning/_ae_fcn.py#L232

av6-github commented 2 months ago

@aadya940 thank you!

av6-github commented 1 month ago

@aadya940 since there is no output layer variable, what do I put in the outputs parameter in the model?

aadya940 commented 1 month ago

@av6-github You have to pass the decoder_output layer.

av6-github commented 1 month ago

@aadya940 i am having some issues with pre commit and certain checks, so i am currently unable to make a proper pull request. :( Apologies!

aadya940 commented 1 month ago

@av6-github Hello, your PR seemed good to me. If you're having issues with Pre-Commit here are the steps:

Install:

python -m pip install pre-commit

Run:

pre-commit run --files path_to_file/file.py

Do let us know if you need any help.

MatthewMiddlehurst commented 1 month ago

@av6-github do you still need a hand with this? It is fine to keep a pull request open even if it is failing the CI currently.

av6-github commented 1 month ago

@av6-github do you still need a hand with this? It is fine to keep a pull request open even if it is failing the CI currently. Oh, thank you so much for the consideration, it means a lot! I am really new to this so am a little confused here! It'd be great if you could help me out here!

av6-github commented 1 month ago

@av6-github Hello, your PR seemed good to me. If you're having issues with Pre-Commit here are the steps:

Install:

python -m pip install pre-commit

Run:

pre-commit run --files path_to_file/file.py

Do let us know if you need any help.

I tried this, but still am having issues! Should I fork the repo again and do the changes on that and open a new pr?

MatthewMiddlehurst commented 1 month ago

Not sure what the issue is without logs really. You can check the errors by creating a PR and then clicking on details on the failing test.

TonyBagnall commented 1 week ago

hi @av6-github we were just reviewing open issues, are you still interested in resolving this? If so, @aadya940 could you advise? thanks.