Skip to content

Simple NN model test with dynamic shape breaks torch.nn.functional #4075

@miladm

Description

@miladm

Looks like this code breaks in pytorch when running the test in this PR.

Error message:

Traceback (most recent call last):
  File "test.py", line 63, in <module>
    before_train = criterion(y_pred.squeeze(), y_test)
  File "/opt/conda/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1190, in _call_impl
    return forward_call(*input, **kwargs)
  File "/opt/conda/lib/python3.7/site-packages/torch/nn/modules/loss.py", line 619, in forward
    return F.binary_cross_entropy(input, target, weight=self.weight, reduction=self.reduction)
  File "/opt/conda/lib/python3.7/site-packages/torch/nn/functional.py", line 3081, in binary_cross_entropy
    if target.size() != input.size():
RuntimeError: NYI

CC @Krovatkin

Metadata

Metadata

Assignees

Labels

dynamismDynamic Shape Features

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions