Loading...
Searching...
No Matches
torchUTILITIES.H File Reference

Header file of the torchUTILITIES file. More...

#include <iostream>
#include <torch/script.h>
#include <torch/torch.h>
#include "ITHACAassert.H"
#include "cnpy.H"

Go to the source code of this file.

Functions

torch::Tensor ITHACAtorch::removeConstValues (torch::Tensor input, std::vector< int > &indices, std::vector< double > &constValues)
bool ITHACAtorch::isConst (torch::Tensor &tTensor)
void ITHACAtorch::save (const torch::Tensor &torchTensor, const std::string fname)
torch::Tensor ITHACAtorch::load (const std::string fname)

Detailed Description

Header file of the torchUTILITIES file.

It contains functions to manipulate torch tensors

Definition in file torchUTILITIES.H.

Function Documentation

◆ isConst()

bool ITHACAtorch::isConst ( torch::Tensor & tTensor)

Definition at line 42 of file torchUTILITIES.C.

◆ load()

torch::Tensor ITHACAtorch::load ( const std::string fname)

Definition at line 70 of file torchUTILITIES.C.

◆ removeConstValues()

torch::Tensor ITHACAtorch::removeConstValues ( torch::Tensor input,
std::vector< int > & indices,
std::vector< double > & constValues )

Definition at line 35 of file torchUTILITIES.C.

◆ save()

void ITHACAtorch::save ( const torch::Tensor & torchTensor,
const std::string fname )

Definition at line 55 of file torchUTILITIES.C.