pub struct ConvolutionProto {Show 13 fields
pub kind: i32,
pub input: Option<TensorDescriptorProto>,
pub filter: Option<TensorDescriptorProto>,
pub output: Option<TensorDescriptorProto>,
pub conv_desc: Option<ConvolutionDescriptorProto>,
pub conv_scale: f64,
pub side_value_scale: f64,
pub activation: i32,
pub input_address: i64,
pub filter_address: i64,
pub output_address: i64,
pub bias_address: i64,
pub side_input_address: i64,
}
Expand description
A convolution. Currently it’s only used for logging. In the future, we may want to use it in the API as well.
Fields§
§kind: i32
§input: Option<TensorDescriptorProto>
§filter: Option<TensorDescriptorProto>
§output: Option<TensorDescriptorProto>
§conv_desc: Option<ConvolutionDescriptorProto>
§conv_scale: f64
result = conv_scale * conv(…) + side_value_scale * side_value. side_value is an arbitrary buffer if activation is not none. Otherwise, it has to be the result buffer (using its old values).
side_value_scale: f64
§activation: i32
§input_address: i64
§filter_address: i64
§output_address: i64
§bias_address: i64
§side_input_address: i64
Implementations§
Source§impl ConvolutionProto
impl ConvolutionProto
Sourcepub fn kind(&self) -> ConvolutionKind
pub fn kind(&self) -> ConvolutionKind
Returns the enum value of kind
, or the default if the field is set to an invalid enum value.
Sourcepub fn set_kind(&mut self, value: ConvolutionKind)
pub fn set_kind(&mut self, value: ConvolutionKind)
Sets kind
to the provided enum value.
Sourcepub fn activation(&self) -> ActivationMode
pub fn activation(&self) -> ActivationMode
Returns the enum value of activation
, or the default if the field is set to an invalid enum value.
Sourcepub fn set_activation(&mut self, value: ActivationMode)
pub fn set_activation(&mut self, value: ActivationMode)
Sets activation
to the provided enum value.
Trait Implementations§
Source§impl Clone for ConvolutionProto
impl Clone for ConvolutionProto
Source§fn clone(&self) -> ConvolutionProto
fn clone(&self) -> ConvolutionProto
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ConvolutionProto
impl Debug for ConvolutionProto
Source§impl Default for ConvolutionProto
impl Default for ConvolutionProto
Source§impl Message for ConvolutionProto
impl Message for ConvolutionProto
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
Source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Encodes the message to a buffer. Read more
Source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Encodes the message with a length-delimiter to a buffer. Read more
Source§fn decode<B>(buf: B) -> Result<Self, DecodeError>
fn decode<B>(buf: B) -> Result<Self, DecodeError>
Decodes an instance of the message from a buffer. Read more
Source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
Decodes a length-delimited instance of the message from the buffer.
Source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
Decodes an instance of the message from a buffer, and merges it into
self
. Read moreSource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
Decodes a length-delimited instance of the message from buffer, and
merges it into
self
.Source§impl PartialEq for ConvolutionProto
impl PartialEq for ConvolutionProto
impl StructuralPartialEq for ConvolutionProto
Auto Trait Implementations§
impl Freeze for ConvolutionProto
impl RefUnwindSafe for ConvolutionProto
impl Send for ConvolutionProto
impl Sync for ConvolutionProto
impl Unpin for ConvolutionProto
impl UnwindSafe for ConvolutionProto
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