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

Matlab implementation of the adaptive version #27

Open
federicoparra opened this issue May 3, 2021 · 4 comments
Open

Matlab implementation of the adaptive version #27

federicoparra opened this issue May 3, 2021 · 4 comments

Comments

@federicoparra
Copy link

Hi Jon, thank you for this amazing loss function! Any hopes for a Matlab implementation of the adaptive version? If you could get me started with the essential pseudocode, I could code it as a custom Deep Learning Toolbox custom layer and post it on Matlab FileExchange, so that Matlab coders using that framework would benefit just by replacing MSE regression layer for this custom layer.

Thank you!
Federico

@jonbarron
Copy link
Owner

Hi Federico, thanks for the kind words! I have no plans to write a matlab implementation of this code, but I'm happy to help support any effort you might have to implement one. I'd recommend just porting the general version of the loss before the adaptive version, as it's much simpler. The implementation order I'd recommend is: general.py, distribution.py, AdaptiveLossFunction in adaptive.py, and then AdaptiveImageLossFunction in adaptive.py (which depends on wavelet.py), as this is how the dependency of the code is structured.

@federicoparra
Copy link
Author

Thank you Jon! I would really like to do this (and might need to anyways, as my PhD dissertation code is in Matlab and I definitely want to use this loss function).

Just a note: I don't intend to use this with images, but rather just with regression problems with tabular data as features.

Would you still recommend the same (i.e., general.py, distribution.py, AdaptiveLossFunction in adaptive.py, and then AdaptiveImageLossFunction in adaptive.py) or it is simpler if no images are involved?

Thank you,
Federico

@jonbarron
Copy link
Owner

Cool, if you don't care about images, then ignore AdaptiveImageLossFunction. If your output is always 1D, you could probably get away with an abridged version of AdaptiveLossFunction in which you just have a single alpha and scale instead of a whole vector of them.

@caolei2000
Copy link

Thank you Jon! I would really like to do this (and might need to anyways, as my PhD dissertation code is in Matlab and I definitely want to use this loss function).

Just a note: I don't intend to use this with images, but rather just with regression problems with tabular data as features.

Would you still recommend the same (i.e., general.py, distribution.py, AdaptiveLossFunction in adaptive.py, and then AdaptiveImageLossFunction in adaptive.py) or it is simpler if no images are involved?

Thank you, Federico

Hello, have you implemented this matlab code yet?

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

3 participants