[−][src]Struct tfrecord::EventWriter
The event writer type.
The EventWriter is initialized by EventWriterInit.
It provies a series write_*
methods and write_*_async
asynchronous
analogues to append events to the file recognized by TensorBoard.
The typical usage call the EventWriterInit::from_prefix with the log directory to build a EventWriter.
use tfrecord::{EventInit, EventWriterInit}; let mut writer = EventWriterInit::default() .from_prefix("log_dir/myprefix-", None) .unwrap(); writer .write_scalar("my_event_name", EventInit::with_step(0), 3.14) .unwrap();
Implementations
impl<W> EventWriter<W> where
W: Write,
[src]
W: Write,
pub fn write_scalar<T>(
&mut self,
tag: T,
event_init: EventInit,
value: f32
) -> Result<(), Error> where
T: ToString,
[src]
&mut self,
tag: T,
event_init: EventInit,
value: f32
) -> Result<(), Error> where
T: ToString,
Write a scalar summary.
pub fn write_histogram<T, H, E>(
&mut self,
tag: T,
event_init: EventInit,
histogram: H
) -> Result<(), Error> where
T: ToString,
H: TryInto<HistogramProto, Error = E>,
Error: From<E>,
[src]
&mut self,
tag: T,
event_init: EventInit,
histogram: H
) -> Result<(), Error> where
T: ToString,
H: TryInto<HistogramProto, Error = E>,
Error: From<E>,
Write a histogram summary.
pub fn write_tensor<T, S, E>(
&mut self,
tag: T,
event_init: EventInit,
tensor: S
) -> Result<(), Error> where
T: ToString,
S: TryInto<TensorProto, Error = E>,
Error: From<E>,
[src]
&mut self,
tag: T,
event_init: EventInit,
tensor: S
) -> Result<(), Error> where
T: ToString,
S: TryInto<TensorProto, Error = E>,
Error: From<E>,
Write a tensor summary.
pub fn write_image<T, M, E>(
&mut self,
tag: T,
event_init: EventInit,
image: M
) -> Result<(), Error> where
T: ToString,
M: TryInto<Image, Error = E>,
Error: From<E>,
[src]
&mut self,
tag: T,
event_init: EventInit,
image: M
) -> Result<(), Error> where
T: ToString,
M: TryInto<Image, Error = E>,
Error: From<E>,
Write an image summary.
pub fn write_image_list<T, V, E>(
&mut self,
tag: T,
event_init: EventInit,
images: V
) -> Result<(), Error> where
T: ToString,
V: TryInfoImageList<Error = E>,
Error: From<E>,
[src]
&mut self,
tag: T,
event_init: EventInit,
images: V
) -> Result<(), Error> where
T: ToString,
V: TryInfoImageList<Error = E>,
Error: From<E>,
Write a summary with multiple images.
pub fn write_audio<T, A, E>(
&mut self,
tag: T,
event_init: EventInit,
audio: A
) -> Result<(), Error> where
T: ToString,
A: TryInto<Audio, Error = E>,
Error: From<E>,
[src]
&mut self,
tag: T,
event_init: EventInit,
audio: A
) -> Result<(), Error> where
T: ToString,
A: TryInto<Audio, Error = E>,
Error: From<E>,
Write an audio summary.
pub fn write_event(&mut self, event: Event) -> Result<(), Error>
[src]
Write a custom event.
pub fn flush(&mut self) -> Result<(), Error>
[src]
Flush this output stream.
impl<W> EventWriter<W> where
W: AsyncWriteExt + Unpin,
[src]
W: AsyncWriteExt + Unpin,
pub async fn write_scalar_async<'_, T>(
&'_ mut self,
tag: T,
event_init: EventInit,
value: f32
) -> Result<(), Error> where
T: ToString,
[src]
&'_ mut self,
tag: T,
event_init: EventInit,
value: f32
) -> Result<(), Error> where
T: ToString,
Write a scalar summary asynchronously.
pub async fn write_histogram_async<'_, T, H, E>(
&'_ mut self,
tag: T,
event_init: EventInit,
histogram: H
) -> Result<(), Error> where
T: ToString,
H: TryInto<HistogramProto, Error = E>,
Error: From<E>,
[src]
&'_ mut self,
tag: T,
event_init: EventInit,
histogram: H
) -> Result<(), Error> where
T: ToString,
H: TryInto<HistogramProto, Error = E>,
Error: From<E>,
Write a histogram summary asynchronously.
pub async fn write_tensor_async<'_, T, S, E>(
&'_ mut self,
tag: T,
event_init: EventInit,
tensor: S
) -> Result<(), Error> where
T: ToString,
S: TryInto<TensorProto, Error = E>,
Error: From<E>,
[src]
&'_ mut self,
tag: T,
event_init: EventInit,
tensor: S
) -> Result<(), Error> where
T: ToString,
S: TryInto<TensorProto, Error = E>,
Error: From<E>,
Write a tensor summary asynchronously.
pub async fn write_image_async<'_, T, M, E>(
&'_ mut self,
tag: T,
event_init: EventInit,
image: M
) -> Result<(), Error> where
T: ToString,
M: TryInto<Image, Error = E>,
Error: From<E>,
[src]
&'_ mut self,
tag: T,
event_init: EventInit,
image: M
) -> Result<(), Error> where
T: ToString,
M: TryInto<Image, Error = E>,
Error: From<E>,
Write an image summary asynchronously.
pub async fn write_image_list_async<'_, T, V, E>(
&'_ mut self,
tag: T,
event_init: EventInit,
images: V
) -> Result<(), Error> where
T: ToString,
V: TryInfoImageList<Error = E>,
Error: From<E>,
[src]
&'_ mut self,
tag: T,
event_init: EventInit,
images: V
) -> Result<(), Error> where
T: ToString,
V: TryInfoImageList<Error = E>,
Error: From<E>,
Write a summary with multiple images asynchronously.
pub async fn write_audio_async<'_, T, A, E>(
&'_ mut self,
tag: T,
event_init: EventInit,
audio: A
) -> Result<(), Error> where
T: ToString,
A: TryInto<Audio, Error = E>,
Error: From<E>,
[src]
&'_ mut self,
tag: T,
event_init: EventInit,
audio: A
) -> Result<(), Error> where
T: ToString,
A: TryInto<Audio, Error = E>,
Error: From<E>,
Write an audio summary asynchronously.
pub async fn write_event_async<'_>(
&'_ mut self,
event: Event
) -> Result<(), Error>
[src]
&'_ mut self,
event: Event
) -> Result<(), Error>
Write a custom event asynchronously.
pub async fn flush_async<'_>(&'_ mut self) -> Result<(), Error>
[src]
Flush this output stream asynchronously.
Trait Implementations
impl<W: Clone> Clone for EventWriter<W>
[src]
fn clone(&self) -> EventWriter<W>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<W: Debug> Debug for EventWriter<W>
[src]
impl<W: PartialEq> PartialEq<EventWriter<W>> for EventWriter<W>
[src]
fn eq(&self, other: &EventWriter<W>) -> bool
[src]
fn ne(&self, other: &EventWriter<W>) -> bool
[src]
impl<W> StructuralPartialEq for EventWriter<W>
[src]
Auto Trait Implementations
impl<W> RefUnwindSafe for EventWriter<W> where
W: RefUnwindSafe,
W: RefUnwindSafe,
impl<W> Send for EventWriter<W> where
W: Send,
W: Send,
impl<W> Sync for EventWriter<W> where
W: Sync,
W: Sync,
impl<W> Unpin for EventWriter<W> where
W: Unpin,
W: Unpin,
impl<W> UnwindSafe for EventWriter<W> where
W: UnwindSafe,
W: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,