/usr/local/lib64/python3.6/site-packages/torch/include/torch/csrc/api/include/torch
NameSizeModeActions
data/-0755rm
detail/-0755rm
nn/-0755rm
optim/-0755rm
serialize/-0755rm
all.h4920644editdlrm
arg.h12190644editdlrm
autograd.h1720644editdlrm
cuda.h7520644editdlrm
data.h3010644editdlrm
enum.h61840644editdlrm
expanding_array.h65800644editdlrm
fft.h98990644editdlrm
imethod.h15360644editdlrm
jit.h9270644editdlrm
linalg.h190260644editdlrm
nn.h2510644editdlrm
optim.h3300644editdlrm
ordered_dict.h165670644editdlrm
python.h97430644editdlrm
serialize.h51960644editdlrm
special.h154900644editdlrm
torch.h1540644editdlrm
types.h20700644editdlrm
utils.h34890644editdlrm
version.h2420644editdlrm
Edit: /usr/local/lib64/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/imethod.h (1536B)
#pragma once #include #include namespace torch { class TORCH_API IMethod { /* IMethod provides a portable interface for torch methods, whether they are backed by torchscript or python/deploy. This is helpful since torchscript methods provide additional information (e.g. FunctionSchema, Graph) which aren't available in pure python methods. Higher level APIs should prefer depending on this interface rather than a specific implementation of it, to promote portability and reuse, and avoid unintentional dependencies on e.g. script methods. Note: This API is experimental, and may evolve. */ public: using IValueList = std::vector; using IValueMap = std::unordered_map; virtual ~IMethod() = default; virtual c10::IValue operator()( std::vector args, const IValueMap& kwargs = IValueMap()) const = 0; virtual const std::string& name() const = 0; // Returns an ordered list of argument names, possible in both // script and python methods. This is a more portable dependency // than a ScriptMethod FunctionSchema, which has more information // than can be generally expected from a python method. const std::vector& getArgumentNames() const; protected: virtual void setArgumentNames(std::vector& argumentNames) const = 0; private: mutable bool isArgumentNamesInitialized_ { false }; mutable std::vector argumentNames_; }; } // namespace torch