Summing LazyTensors after reshape
See original GitHub issueLets say I have a LazyTensor v
of shape n x m
where m
is a multiple of p
. I want to compute v.reshape((n, m//p, p)).sum(-1)
, only that LazyTensor does not support reshape
. Is there another way to achieve what I want?
This is for reimplementing some of the code for Kernel Conditional density operators.
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
LazyTensor dot product with itself · Issue #133 · getkeops/keops
Hi everyone, I have a slight issue with the matrix product evaluated on lazy tensors. Let's K is a [N, M] matrix -...
Read more >class gpytorch.lazy. LazyTensor
(The LazyTensor is reshaped as a b/k x k x n x m LazyTensor and the k dimension is multiplied over. Returns a...
Read more >PyTorch reshape tensor dimension - Stack Overflow
reshape () is made to dupe the numpy reshape method. It came after the view() and torch.resize_() and it is inside the dir(torch)...
Read more >LazyTensor: combining eager execution with domain-specific ...
storage with their base Tensors. For example, in the following snippet of code: t = torch.rand(4, 4) v = t.view(2, 8) v is...
Read more >Extended benchmarks and implementations - NIPS papers
x_j = LazyTensor(x.reshape(1, N, D)). # (1, N, D) data samples. 17. 18. D_ij = ((x_i - x_j) ** 2).sum(2).sqrt() # (N, N)...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ll try to get around to this later this week or early next week.
I was trying to figure out the code, but I must admit I’m a bit lost and unsure about implicit assumptions it makes. If you could take a stab, I would greatly appreciate it!