question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Summing LazyTensors after reshape

See original GitHub issue

Lets 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:open
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
gpleisscommented, Nov 20, 2019

I’ll try to get around to this later this week or early next week.

1reaction
ingmarschustercommented, Nov 19, 2019

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!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found