Struct owlyshield_ransom::predictions::prediction::input_tensors::VecvecCapped[][src]

pub struct VecvecCapped<T> {
    pub capacity_cols: usize,
    pub capacity_rows: usize,
    elems: VecDeque<Vec<T>>,
}
Expand description

A matrix with fixed_size to feed the model’s input tensors, because too long sequences (> 1000 steps) would deserve the predictions with RNN, unless tbtt is used.

For example, with capacity_cols = 2 and capacity_rows = 3, after three steps

TimestepFeature 1Feature 2
1a1b1
2a2b2
3a3b3

Then after a fourth step was added:

TimestepFeature 1Feature 2
2a2b2
3a3b3
4a4b4

Fields

capacity_cols: usize

Number of features, equivalent to input_tensor.dim[1]

capacity_rows: usize

Max number of timesteps.

elems: VecDeque<Vec<T>>

Implementations

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

The returned type after indexing.

Performs the indexing (container[index]) operation. Read more

Performs the mutable indexing (container[index]) operation. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.