/usr/local/lib64/python3.6/site-packages/torch/include/caffe2/utils
NameSizeModeActions
math/-0755rm
threadpool/-0755rm
bench_utils.h8540644editdlrm
cast.h11100644editdlrm
cblas.h341830644editdlrm
conversions.h6610644editdlrm
cpuid.h25600644editdlrm
cpu_neon.h15780644editdlrm
eigen_utils.h67060644editdlrm
filler.h39870644editdlrm
fixed_divisor.h36340644editdlrm
knobs.h5320644editdlrm
knob_patcher.h7150644editdlrm
map_utils.h6350644editdlrm
math-detail.h19160644editdlrm
math.h152510644editdlrm
murmur_hash3.h9090644editdlrm
proto_convert.h2630644editdlrm
proto_utils.h132540644editdlrm
proto_wrap.h3780644editdlrm
signal_handler.h6980644editdlrm
simple_queue.h26020644editdlrm
smart_tensor_printer.h14020644editdlrm
string_utils.h12060644editdlrm
zmq_helper.h30200644editdlrm
Edit: /usr/local/lib64/python3.6/site-packages/torch/include/caffe2/utils/smart_tensor_printer.h (1402B)
#pragma once #include "caffe2/core/tensor.h" namespace caffe2 { // This is a wrapper around the TensorPrinter that doesn't require the user to // explicit specify the type of the tensor while calling the Print() method. // It also supports a convenience function with a default constructed printer as // a static method. class TORCH_API SmartTensorPrinter { public: // The proliferation of constructors is to give the feature parity with // TensorPrinter // yet not repeat the default arguments explicitly in case they change in the // future. SmartTensorPrinter() = default; explicit SmartTensorPrinter(const std::string& tensor_name); SmartTensorPrinter( const std::string& tensor_name, const std::string& file_name); SmartTensorPrinter( const std::string& tensor_name, const std::string& file_name, int limit); void Print(const Tensor& tensor); void PrintMeta(const Tensor& tensor) { tensorPrinter_.PrintMeta(tensor); } // Uses a default constructed SmartTensorPrinter static void PrintTensor(const Tensor& tensor); // Uses a default constructed SmartTensorPrinter void PrintTensorMeta(const Tensor& tensor) { DefaultTensorPrinter().PrintMeta(tensor); } private: // Returns a thread local default constructed TensorPrinter static SmartTensorPrinter& DefaultTensorPrinter(); TensorPrinter tensorPrinter_; }; }