/
vshmidt
/
pytorch
Обзор
Документация
Войти
/
vshmidt
/
pytorch
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
android/pytorch_android/generate_test_asset.cpp
20 строк
450 B
PyTorch MergeBot
Revert "Reapply "Delete TorchScript based Android demo app and point to ExecuTorch (#153633)" (#153656)"
17 май 2025, 00:00
17 май 2025, 00:00
084c4aa
Код
Авторство
О чём код?
#include <torch/csrc/jit/api/module.h> #include <torch/jit.h> #include <torch/script.h> #include <fstream> #include <iostream> #include <string> int main(int argc, char* argv[]) { std::string input_file_path{argv[1]}; std::string output_file_path{argv[2]}; std::ifstream ifs(input_file_path); std::stringstream buffer; buffer << ifs.rdbuf(); torch::jit::Module m("TestModule"); m.define(buffer.str()); m.save(output_file_path); }