Skip to content

ExternalException: Unsupported TypeMeta in ATen: nullptr (uninitialized) (please report this error) #1449

Open
@EDGlittilelamb

Description

@EDGlittilelamb

I was trying to apply a LSTM model to my game in unity.
LSTMModel = new LSTMModel(6, 512, 8); LSTMModel.load("Assets/Scripts/Brain/model_state_dict.pth");
It first raised a error that ArgumentException: Mismatched state_dict sizes: expected 14, but found 80 entries. Then I printed out the size of this model in vs code using python, and the size of the model was 14. It is the same size in C#.

I had no choice but to set the parameter inside the function <torch.load> to false
LSTMModel.load("Assets/Scripts/Brain/model_state_dict.pth",false);

Unfortunately, it raised another error that ExternalException: Unsupported TypeMeta in ATen: nullptr (uninitialized) (please report this error).

I'm grateful for any replies.

unity version:2021.3.43f1c1
TorchSharp: 0.105

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions