Skip to content
This repository was archived by the owner on Nov 28, 2025. It is now read-only.

Invalid index of a 0-dim tensor #34

@HaolinChen

Description

@HaolinChen

I'm running the MINIST_test demo. When I run to the model.qd_stage(eps_in=1. / 255) in the Stage 3: QuantizedDeployable, some error occurs.
File "F:/DeepLearning/nemo/tests/mnist_test.py", line 344, in <module> model.qd_stage(eps_in=1. / 255) File "F:\DeepLearning\nemo\nemo\transf\deploy.py", line 152, in _qd_stage self.set_deployment(eps_in=eps_in, **kwargs) # with initial BN eps File "F:\DeepLearning\nemo\nemo\transf\deploy.py", line 79, in _set_deployment_pact self.set_eps_in(eps_in) File "F:\DeepLearning\nemo\nemo\transf\deploy.py", line 109, in _set_eps_in_pact m.eps_in = torch.tensor(eps_in_new[0], requires_grad=False) IndexError: invalid index of a 0-dim tensor. Usetensor.item()in Python ortensor.item() in C++ to convert a 0-dim tensor to a number

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