Struct primitiv::Shape [] [src]

pub struct Shape { /* fields omitted */ }

Data structure to represent the shape of the node.

Methods

impl Shape
[src]

[src]

Creates a new scalar Shape object.

[src]

Creates a new Shape object.

[src]

Returns the size of the i-th dimension.

[src]

Returns the dimension array.

[src]

Returns the depth (length of non-1 dimensions) of the shape.

[src]

Returns the batch size.

[src]

Returns the number of elements in each sample. This value is equal to the product of all dimensions.

[src]

Returns the number of elements in 1 to specified dim.

[src]

Returns the number of elements in all samples of the mini-batch. This value is equal to batch() * volume().

[src]

Checks whether the shape has minibatch or not.

[src]

Checks whether two batch size is compatible (broadcastable) or not.

[src]

Checks whether the shape is a scalar or not.

[src]

Checks whether the shape is a column vector or not.

[src]

Checks whether the shape is a vector or a matrix, or not.

[src]

Checks whether two shapes have completely same dimensions.

[src]

Checks whether two shapes have same dimensions without an axis. (LOO: leave one out)

[src]

Creates a new shape which have one different dimension.

[src]

Creates a new shape which have specified batch size.

[src]

Directly updates a specified dimension.

[src]

Directly updates the batch size.

Trait Implementations

impl Debug for Shape
[src]

[src]

Formats the value using the given formatter. Read more

impl Wrap<primitivShape_t> for Shape
[src]

impl Drop for Shape
[src]

[src]

Executes the destructor for this type. Read more

impl Clone for Shape
[src]

[src]

Returns a copy of the value. Read more

[src]

Performs copy-assignment from source. Read more

impl PartialEq for Shape
[src]

[src]

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

1.0.0
[src]

This method tests for !=.

impl Eq for Shape
[src]

impl Display for Shape
[src]

[src]

Formats the value using the given formatter. Read more

impl Into<Shape> for [u32; 0]
[src]

[src]

Performs the conversion.

impl Into<Shape> for [u32; 1]
[src]

[src]

Performs the conversion.

impl Into<Shape> for [u32; 2]
[src]

[src]

Performs the conversion.

impl Into<Shape> for [u32; 3]
[src]

[src]

Performs the conversion.

impl Into<Shape> for [u32; 4]
[src]

[src]

Performs the conversion.

impl Into<Shape> for [u32; 5]
[src]

[src]

Performs the conversion.

impl Into<Shape> for [u32; 6]
[src]

[src]

Performs the conversion.

impl Into<Shape> for [u32; 7]
[src]

[src]

Performs the conversion.

impl Into<Shape> for [u32; 8]
[src]

[src]

Performs the conversion.

impl Into<Shape> for ([u32; 0], u32)
[src]

[src]

Performs the conversion.

impl Into<Shape> for ([u32; 1], u32)
[src]

[src]

Performs the conversion.

impl Into<Shape> for ([u32; 2], u32)
[src]

[src]

Performs the conversion.

impl Into<Shape> for ([u32; 3], u32)
[src]

[src]

Performs the conversion.

impl Into<Shape> for ([u32; 4], u32)
[src]

[src]

Performs the conversion.

impl Into<Shape> for ([u32; 5], u32)
[src]

[src]

Performs the conversion.

impl Into<Shape> for ([u32; 6], u32)
[src]

[src]

Performs the conversion.

impl Into<Shape> for ([u32; 7], u32)
[src]

[src]

Performs the conversion.

impl Into<Shape> for ([u32; 8], u32)
[src]

[src]

Performs the conversion.

Auto Trait Implementations

impl !Send for Shape

impl !Sync for Shape