About 1,450,000 results
Open links in new tab
  1. What does .contiguous () do in PyTorch? - Stack Overflow

    Feb 21, 2018 · What does x.contiguous () do for a tensor x?A one-dimensional array [0, 1, 2, 3, 4] is contiguous if its items are laid out in memory next to each other just like ...

  2. What is the difference between contiguous and non-contiguous arrays?

    Nov 18, 2014 · A contiguous array is just an array stored in an unbroken block of memory: to access the next value in the array, we just move to the next memory address. Consider the 2D array arr = …

  3. arrays - What is contiguous subarray - Stack Overflow

    May 29, 2018 · Still not very clear. Subarray = "any part or section of an array", contiguous = "sharing a common border; touching". Is contiguous referring to the array indices or the values? Please explain …

  4. AttributeError: 'Flags' object has no attribute 'c_contiguous'

    Dec 6, 2023 · { AttributeError: 'Flags' object has no attribute 'c_contiguous'" } Since I am following the book, I expected this code to work. I have tried solutions from Google Bard and Claude AI chatbots …

  5. Difference between 'consecutive' and 'contiguous'? [closed]

    Apr 16, 2017 · A production line that makes sweet rolls first takes one, infinitely long, contiguous roll, and then chops it into separate, bite-sized rolls, packing consecutive small rolls into packages.

  6. How to group a dataset by contiguous items? [duplicate]

    Oct 18, 2025 · How to group a dataset by contiguous items? [duplicate] Asked 12 years, 9 months ago Modified 1 month ago Viewed 5k times

  7. Are std::vector elements guaranteed to be contiguous?

    Aug 31, 2013 · 2 cplusplus.com: Vector containers are implemented as dynamic arrays; Just as regular arrays, vector containers have their elements stored in contiguous storage locations, which means …

  8. In PyTorch, what makes a tensor have non-contiguous memory?

    Jan 8, 2019 · In general, if you have non-contiguous tensor t, you can make it contiguous by calling t = t.contiguous(). If t is contiguous, call to t.contiguous() is essentially a no-op, so you can do that …

  9. Is the memory allocated for struct members continguous? What if a ...

    For a specific instance of this struct say test A are A.height, A.age, A.gender contiguous in memory? More generally, how do the layouts in memory for a Structure of Arrays and an Array of structures …

  10. What functions or modules require contiguous input?

    Nov 4, 2021 · As I understand, you need to call tensor.contiguous() explicitly whenever some function or module needs a contiguous tensor. Otherwise you get exceptions like: RuntimeError: invalid …