NEGU93 / cvnn

Library to help implement a complex-valued neural network (cvnn) using tensorflow as back-end
https://complex-valued-neural-networks.readthedocs.io/
MIT License
164 stars 34 forks source link

Pytorch implementation #33

Closed SantaTitular closed 1 year ago

SantaTitular commented 1 year ago

Hi again Jose,

With the recent developments of Pytorch support for complex valued data, is it worth to migrate to Pytorch style of implementation? Even though Pytorch doest not have the detail and custom function of your library (imag_to_real softmax), have you tried/is it possible to build similar architectures in Pytorch (simple FFNs im my case)? Is there advantages in using Pytorch that you do not have in Keras?

Best, Tomás

NEGU93 commented 1 year ago

is it worth to migrate to Pytorch style of implementation?

This seems a more personal question. However, I'll give my opinion. Pytorch is almost at the same level than tensorflow. The only difference that I know of is that it has the convolution operation. I would recommend the library complexPytorch if you prefer Pytorch. However, recent advancements on pytorch might indicate that CVNNs might be fully supported in the future.

As if you question is if I should particularly do it. Well no, the change would also be as starting from zero. So a huge investment of my time which I don't have.

is it possible to build similar architectures in Pytorch?

Yes! Again, there is complexPytorch for that.

Is there advantages in using Pytorch that you do not have in Keras?

Not particularly that I know of. Other than the ones you can find in a "tensorflow vs pytorch" google search.

As a conclusion: I would say: use the library you like best. If you have no preference, and your only use case is CVNNs and you plan it to be a long term project, then Pytorch has higher chances of fully supporting CVNNs in the future.

SantaTitular commented 1 year ago

Thanks for the fast reply!

Apologies if sounded personal but I was asking, mainly, because of the updates that you were posting concerning Pytorch and I was curious whether you were comparing/considering using Pytorch (or if they are supported already). I had seen the library that you mentioned and I was almost sure it was becoming obsolete due to the advances/support with the main Pytorch modules but, I will double check.

In all honestly, I think your library is very good and straightfoward for my current use, was really just curious whether the CVNNs were supported by Pytorch already and if the results similar.

NEGU93 commented 1 year ago

I understand. So as far as I am concerned. Both have:

Both libraries lack full support by not having losses, activation functions, layers, etc. So yet, both mine and complexPytorch are still useful, I imagine they will stay so for at least a couple of years.