Hello,
Being one of the early adopters and advocated of PyTorch, I have the strange feeling that Libtorch is, to some extent neglected. This is evident in the level of activity and chatter in the C++ sub-forum.
I find that it is very hard to get answers to the simplest questions, such as: how to work in batches during inference / and or training for ImageNet like datasets? How to utilise multiple GPU’s during training and inference of traced modules? Where can I find an example for loading  an ImageNet like dataset NOT Mnist? and much more.
All these are trivial in PyTorch/ Python and seem almost impossible in Libtorch.
References to my questions:

  
    
    
    "Automatic parallelization of models onto multiple GPUs" C++
  
  
    Hello, 
I have a traced model which i use in C++. 
The documentation clearly states: “Automatic parallelization of models onto multiple GPUs like torch.nn.parallel.DataParallel”. 
However I do not see this happening on a multi-gpu device. How do i explicitly force the auto module = torch::jit::load(s_model_name, torch::kCUDA); module to be defined like it would be in pure PyTorch? 
Thanks.
  



  
    
    
    Batch as input to module->forward({inputs}).toTensor() C++
  
  
    Hello, 
I am trying to work in batches while reading frames using CV2 from a video like so. I first read 8 frames, batch them into std::vector<torch::jit::IValue> and then run them through module->forward({inputs}).toTensor();. However, if the batch size is larger than 1, it crashes. I guess there is some reshaping involved to add the batch dimension I am just not sure how to do it in C++. 
    int batch_size =1;
    int b_counter=0;

    std::vector<torch::jit::IValue> inputs; //Accumulates the…
  



  
    
    
    (libtorch) How to use torch::data::datasets for custom dataset? C++
  
  
    Hello, 
Were you able to come up with a working example that mimics that of the PyTorch-based dataset for reading images? 
class GenericDataset(torch.utils.data.Dataset):
  def __init__(self, labels, root_dir, subset=False, transform=None):
    self.labels = labels
    self.root_dir = root_dir
    self.transform = transform

  def __len__(self):
    return len(self.labels)

  def __getitem__(self, idx):
    img_name = self.labels.iloc[idx, 0]  # file name
    fullname = join(self.root_dir, img_n…
  


Is there a formal policy that allocates more resources to PyTorch related questions rather than Libtorch? If not, what is the explanation for the lack of documentation and infrequent answers in the forums?
Many thanks,