Comments (5)
is the matrix here contiguous? Can you post a code snippet to reproduce the issue?
from torch7.
I cropped the first column of an image, therefore no, data are not contiguous.
require 'image'
lena = image.lena()
lenaColumn = lena[{ {},{1,5},{1} }]
= lenaColumn
= lenaColumn:repeatTensor(1,1,2)
which outputs
(1,.,.) =
0.7569
0.7686
0.7804
0.7843
0.7843
(2,.,.) =
0.4353
0.4471
0.4510
0.4549
0.4549
(3,.,.) =
0.2902
0.3020
0.3059
0.3137
0.3216
[torch.DoubleTensor of dimension 3x5x1]
(1,.,.) =
0.7569 0.7569
0.7765 0.7765
0.7647 0.7647
0.7647 0.7647
0.7843 0.7843
(2,.,.) =
0.7882 0.7882
0.7804 0.7804
0.7922 0.7922
0.7725 0.7725
0.7765 0.7765
(3,.,.) =
0.7686 0.7686
0.7529 0.7529
0.7529 0.7529
0.7569 0.7569
0.7451 0.7451
[torch.DoubleTensor of dimension 3x5x2]
from torch7.
Yeah its definitely a problem of contiguity. When the input is contiguous, repeatTensor works.
Maybe we should just as an assert(tensor:isContiguous())
for now. Also, while we are in this function, we should probably allow passing a result tensor as is the case for most methods (allows for reusing memory).
from torch7.
closed via c19c892
from torch7.
Thank you!
from torch7.
Related Issues (20)
- Installing Torch in google colab after upgrading cmake, previously worked fine but give me "Error: Build error: Failed building" HOT 1
- Unable to install torch7 on manjaro HOT 2
- tls_local_tensor_type_set can not find _C.pyd simplely?
- YOLO3 make error
- build failed on AArch64, Fedora 33
- た
- Cannot install. Error: Unknown command: cask HOT 2
- torch.load issue on different folder
- cpu Torch7 installation procedure???
- 'python-software-properties' has no installation candidate HOT 1
- Cannot install new package using luarocks install
- Trying to install torch7 on raspberry pi
- Trying to install Torch on MacbookPro with Apple M1 HOT 1
- module 'paths' not found:
- Hrhdh HOT 1
- connnect
- I'm facing difficulty in installing installing the torch7 platform on ubuntu 20.04 wsl(windows 64 bit) HOT 2
- RuntimeError: Tracer cannot infer type of Seq2SeqLMOutput
- nn.Identity() Impact model accuracy
- Nn.comv3d does not support MPS. How to handle it? Can it not be used on Mac M chips
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from torch7.