Closed ccshan closed 10 months ago
@ccshan See https://github.com/diprism/fggs/actions/runs/6463666334, there are 5 test cases failing to pass.
@ccshan See https://github.com/diprism/fggs/actions/runs/6463666334, there are 5 test cases failing to pass.
Thanks! Wow! I fixed that.
Now to "optimize project(to_dense()) composition"...
@ccshan See https://github.com/diprism/fggs/actions/runs/6463666334, there are 5 test cases failing to pass.
Thanks! Wow! I fixed that.
Now to "optimize project(to_dense()) composition"...
Will work on that this weekend.
Now to "optimize project(to_dense()) composition"...
Will work on that this weekend.
I hope I'll get to it before you do!
I think Axis.unify
needs to be used. And unfortunately, the best example of how to use Axis.unify
is in PatternedTensor.einsum
(which is called in PatternedTensor.mv
, PatternedTensor.mm
, and TestPatternedTensor.test_einsum
).
Now to "optimize project(to_dense()) composition"...
Will work on that this weekend.
I hope I'll get to it before you do!
I think
Axis.unify
needs to be used. And unfortunately, the best example of how to useAxis.unify
is inPatternedTensor.einsum
(which is called inPatternedTensor.mv
,PatternedTensor.mm
, andTestPatternedTensor.test_einsum
).
Here is the latest CI result: https://github.com/diprism/fggs/actions/runs/6522580767
I didn't use Axis.unify
but wrote another function reproject
. This function takes out a value from its first argument if the virtual coordinate of that element is also a virtual coordinate corresponding to one of elements in its second argument's physical. Otherwise it defaults to 0. If a virtual coordinate of one of its second argument's physical element is not in the first one's physical, it also defaults to 0.
I think unification allows something like reproject to take place without computing out_indices...
I don't think t2.physical
should be involved at all in the returned PatternedTensor, like it is on line 560...
It shouldn't. I don't know what I was thinking... The idea is to use the indices to filter the values from gradients. But since Axis.unify
is used, reproject
can be removed. Sorry for this stupid mistake!
I guess
SumProduct.backward
needs to do something like callingfggs.indices.project
?