josiahwsmith10 / complextorch

GNU General Public License v3.0
19 stars 5 forks source link

convert CVTensor back to torch tensor complex #4

Closed rachelglenn closed 1 month ago

rachelglenn commented 1 month ago

Hi. How do I convert a CVTensor back to a torch tensor complex tensor? Is it possible to do this in between model layers or would the casting cause an error with the gradient? Thank you in advance.

josiahwsmith10 commented 1 month ago

You can do x.complex(), which should retain the gradients.

On Wed, Aug 7, 2024 at 1:19 PM rachelglenn @.***> wrote:

Hi. How do I convert a CVTensor back to a torch tensor complex tensor? Is it possible to do this in between model layers or would the casting cause an error with the gradient? Thank you in advance.

— Reply to this email directly, view it on GitHub https://github.com/josiahwsmith10/complextorch/issues/4, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALNW76SROKVRUBW7LOR2IM3ZQJJLPAVCNFSM6AAAAABME25SUSVHI2DSMVQWIX3LMV43ASLTON2WKOZSGQ2TGOJWG42DSOI . You are receiving this because you are subscribed to this thread.Message ID: @.***>

rachelglenn commented 1 month ago

Thank you. I will close this issue. I have another issue with the gradient. I will open an new issue.