[RFC] [bug] `logsumexp` in GCNNs
Created by: attila-i-szabo
At the moment, GCNNs fail if they only use real parameters but try to return a negative WF amplitude whose log should be complex. This arises if you use a nontrivial irrep, some entries of which are negative. The problem is logsumexp
, which returns NaN if it has to take the log of a negative float
. I am happy to fix this, but I would appreciate some input on which of the following strategies is preferable:
- Promote the outputs of the last layer into complex numbers – wastes memory
- Promote the characters into complex numbers – the code of
logsumexp
suggests that would waste the same amount of memory in type promotions - Use the
return_sign
option oflogsumexp
and convert the sign part into 0 or iπ – this only works for real networks and irreps, so a lot of type checking and conditionals are needed
@chrisrothUT @PhilipVinc @femtobit?