Skip to content

提取特征异常 #2

@903142301

Description

@903142301

你好,非常感谢提供的csharp的案例,这对我很有帮助。

我在案例复现的时候遇到了关于的问题

  • 在训练的时候 Tensor output = (Tensor)backbone.forward(tensorData);显示 ndex was out of range. Must be non-negative and less than the size of the collection. Arg_ParamName_Name”异常

  • 推理加载 void LoadMemoryBank(string c) { memorybank = torch.load(c); } 显示“No such serialized tensor '0' 异常

  • 我想知道这是pth模型导出不对造成的吗,下文是在anomalib1.0.1中导出的代码

  • model = Patchcore(pre_trained=True) engine = Engine(task="classification", max_epochs=1) engine.train(datamodule=datamodule, model=model) model.eval() example_input = torch.randn(1, 3, 256, 256) traced_script_module = torch.jit.trace(model,example_inputs=example_input,strict=False) traced_script_module.save("converted_model.pth")

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