pub struct Wire { /* private fields */ }Expand description
A half-declared graph.
Implementations§
Source§impl Wire
impl Wire
Sourcepub fn on(self, device: Device) -> Wire
pub fn on(self, device: Device) -> Wire
This whole piece on one device. The innermost one wins:
(a.on(Cuda(0)) >> b).on(Cuda(1)) leaves a on 0 and b on 1.
Sourcepub fn at(self, host: impl Into<Host>) -> Wire
pub fn at(self, host: impl Into<Host>) -> Wire
This whole piece on one host, likewise, and independent of the device: the two can be written in any order.
Sourcepub fn frozen(self) -> Wire
pub fn frozen(self) -> Wire
This whole piece settled: its state does not change while the graph
runs, innermost first. Only the half the core can hold — whoever knows
what a gradient is says it again with the digest. See Memory::freeze.
Sourcepub fn cached(self) -> Wire
pub fn cached(self) -> Wire
This whole piece worth keeping: what each node produces is looked up
before being computed and kept after. Whether it can honestly be kept is
cacheable’s question, asked before running.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Wire
impl !RefUnwindSafe for Wire
impl Send for Wire
impl Sync for Wire
impl Unpin for Wire
impl UnsafeUnpin for Wire
impl !UnwindSafe for Wire
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more