 DeepLearning/Tensor/MatrixMultiply - Maple Programming Help

# Online Help

###### All Products    Maple    MapleSim

Home : Support : Online Help : Programming : DeepLearning Package : Tensors : Matrix Operations on Tensors : DeepLearning/Tensor/MatrixMultiply

DeepLearning/Tensor/MatrixMultiply

compute matrix multiplication of Tensors

 Calling Sequence MatrixMultiply(x,y,opts)

Parameters

 x - Tensor y - Tensor opts - zero or more options as specified below

Options

 • name=string

The value of option name specifies an optional name for this Tensor, to be displayed in output and when visualizing the dataflow graph.

Description

 • The MatrixMultiply(x,y,opts) command computes the matrix multiplication product of two Tensor objects.

Examples

 > $\mathrm{with}\left(\mathrm{DeepLearning}\right):$
 > $\mathrm{m1}≔\mathrm{Constant}\left(⟨⟨-92.1,-31.3,67.3⟩|⟨-35.0,65.0,41.0⟩⟩\right)$
 ${\mathrm{m1}}{≔}\left[\begin{array}{c}{\mathrm{DeepLearning Tensor}}\\ {\mathrm{Name: Const:0}}\\ {\mathrm{Shape: \left[3, 2\right]}}\\ {\mathrm{Data Type: float\left[8\right]}}\end{array}\right]$ (1)
 > $\mathrm{m2}≔\mathrm{Constant}\left(⟨⟨99.7,29.0⟩|⟨44.5,-14.0⟩|⟨45.0,24.0⟩⟩\right)$
 ${\mathrm{m2}}{≔}\left[\begin{array}{c}{\mathrm{DeepLearning Tensor}}\\ {\mathrm{Name: Const_1:0}}\\ {\mathrm{Shape: \left[2, 3\right]}}\\ {\mathrm{Data Type: float\left[8\right]}}\end{array}\right]$ (2)
 > $\mathrm{value}\left(\mathrm{MatrixMultiply}\left(\mathrm{m1},\mathrm{m2}\right)\right)$
 $\left[\begin{array}{ccc}{-10197.3700000000}& {-3608.45000000000}& {-4984.50000000000}\\ {-1235.61000000000}& {-2302.85000000000}& {151.500000000000}\\ {7898.81000000000}& {2420.85000000000}& {4012.50000000000}\end{array}\right]$ (3)

Compatibility

 • The DeepLearning/Tensor/MatrixMultiply command was introduced in Maple 2019.
 • For more information on Maple 2019 changes, see Updates in Maple 2019.

 See Also