Skip to content

Broadcasting doesn't match docs for conda package #1994

@jramapuram

Description

@jramapuram

Am I just early and this feature isn't packaged and deployed?

~ conda install pytorch torchvision -c soumith
Fetching package metadata ...........
Solving package specifications: .
Warning: 2 possible package resolutions (only showing differing packages):
  - soumith::pytorch-0.1.12-py361_2cu75
  - soumith::pytorch-0.1.12-py36_2cu75

# All requested packages already installed.
# packages in environment at /Users/jramapuram/anaconda:
#
pytorch                   0.1.12              py361_2cu75    soumith
torchvision               0.1.8                    py36_2    soumith
In [6]: x=torch.FloatTensor(5,3,4,1)

In [7]: y=torch.FloatTensor(3,1,1)

In [8]: (x.add_(y)).size()
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
<ipython-input-8-a6afff02e3c6> in <module>()
----> 1 (x.add_(y)).size()

RuntimeError: inconsistent tensor size at /Users/soumith/miniconda2/conda-bld/pytorch_1493757886437/work/torch/lib/TH/generic/THTensorMath.c:831

In [9]: x + y
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
<ipython-input-9-b50c5120e24b> in <module>()
----> 1 x + y

/Users/jramapuram/anaconda/lib/python3.6/site-packages/torch/tensor.py in __add__(self, other)
    265     # TODO: add tests for operators
    266     def __add__(self, other):
--> 267         return self.add(other)
    268     __radd__ = __add__
    269

RuntimeError: inconsistent tensor size at /Users/soumith/miniconda2/conda-bld/pytorch_1493757886437/work/torch/lib/TH/generic/THTensorMath.c:831

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions