Struct caffe2_tensor::SmartTensorPrinter
source · pub struct SmartTensorPrinter<W: Write> { /* private fields */ }
Expand description
| 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. |
Implementations§
source§impl<W: Write> SmartTensorPrinter<W>
impl<W: Write> SmartTensorPrinter<W>
pub fn new_from_tensorname(tensor_name: &String) -> Self
pub fn new_from_tensorname_and_filename( tensor_name: &String, file_name: &String ) -> Self
pub fn new(tensor_name: &String, file_name: &String, limit: i32) -> Self
sourcepub fn print_tensor_meta(&mut self, tensor: &Tensor)
pub fn print_tensor_meta(&mut self, tensor: &Tensor)
| Uses a default constructed | SmartTensorPrinter |
pub fn print_meta(&mut self, tensor: &Tensor)
pub fn print(&mut self, tensor: &Tensor)
sourcepub fn default_tensor_printer(&mut self) -> &mut SmartTensorPrinter<W>
pub fn default_tensor_printer(&mut self) -> &mut SmartTensorPrinter<W>
| Returns a thread local default constructed | TensorPrinter |
sourcepub fn print_tensor(&mut self, tensor: &Tensor)
pub fn print_tensor(&mut self, tensor: &Tensor)
| Uses a default constructed | SmartTensorPrinter |
Trait Implementations§
Auto Trait Implementations§
impl<W> RefUnwindSafe for SmartTensorPrinter<W>where W: RefUnwindSafe,
impl<W> Send for SmartTensorPrinter<W>where W: Send,
impl<W> Sync for SmartTensorPrinter<W>where W: Sync,
impl<W> Unpin for SmartTensorPrinter<W>
impl<W> UnwindSafe for SmartTensorPrinter<W>where W: UnwindSafe,
Blanket Implementations§
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.