Skip to content

RuntimeError: mat1 dim 1 must match mat2 dim 0 #4

@jvel07

Description

@jvel07

Hi, congrats on the project!
I am getting this error, could not figure out what's going on:

File "/media/user/hk-data/PycharmProjects/dnn_embeddings_pytorch/train_model.py", line 148, in train_model
output = net(x_train)
File "/home/user/anaconda3/envs/general_py37/lib/python3.7/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "/media/user/hk-data/PycharmProjects/dnn_embeddings_pytorch/dnn_models.py", line 240, in forward
output_logits = self.fc1_linear(complete_embedding)
File "/home/user/anaconda3/envs/general_py37/lib/python3.7/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/user/anaconda3/envs/general_py37/lib/python3.7/site-packages/torch/nn/modules/linear.py", line 93, in forward
return F.linear(input, self.weight, self.bias)
File "/home/user/anaconda3/envs/general_py37/lib/python3.7/site-packages/torch/nn/functional.py", line 1690, in linear
ret = torch.addmm(bias, input, weight.t())
RuntimeError: mat1 dim 1 must match mat2 dim 0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions