OmniSciDB  a5dc49c757
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TorchWarmer Class Reference

#include <TorchWrapper.h>

Static Public Member Functions

static bool warmup_torch (const std::string &model_path, const bool use_gpu, const int64_t device_num)
 

Static Public Attributes

static bool is_torch_warmed
 

Detailed Description

Definition at line 69 of file TorchWrapper.h.

Member Function Documentation

bool TorchWarmer::warmup_torch ( const std::string &  model_path,
const bool  use_gpu,
const int64_t  device_num 
)
static

Definition at line 503 of file TorchWrapper.cpp.

References ModelInfo::class_labels, get_model_info_from_file(), and print_model_params().

505  {
506  const auto model_info = get_model_info_from_file(model_path);
507  for (size_t l = 0; l < model_info.class_labels.size(); ++l) {
508  std::cout << l << ": " << model_info.class_labels[l] << std::endl;
509  }
510  print_model_params(model_path, use_gpu, device_num);
511  return true;
512 }
ModelInfo get_model_info_from_file(const std::string &filename)
void print_model_params(const std::string &model_path, const bool use_gpu, const int64_t device_num)

+ Here is the call graph for this function:

Member Data Documentation

bool TorchWarmer::is_torch_warmed
static

Definition at line 74 of file TorchWrapper.h.


The documentation for this class was generated from the following files: