Skip to content

How can I use the generated pte file to process my own data and predict the results? #3939

@tayloryoung-o

Description

@tayloryoung-o

auto train_loader = torch::data::make_data_loader(
SWaTegLoader("/dataset/train.csv", 100, 10, "train"),
batch_size=256,
torch::data::DataLoaderOptions().workers(0).shuffle(true)
);

Is this correct? Then how do we process the data with the model?

for (auto& batch : *train_loader) {
    auto input = batch.data.to(device), labels = batch.target.to(device);
    auto output = method->execute(input)

Is it correct to write code in libtorch way?

Metadata

Metadata

Assignees

No one assigned

    Labels

    need-user-inputThe issue needs more information from the reporter before moving forward

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions