tf.compat.v1.sparse_matmul
Stay organized with collections
Save and categorize content based on your preferences.
Multiply matrix "a" by matrix "b". (deprecated)
tf . compat . v1 . sparse_matmul (
a : Annotated [ Any , tf . raw_ops . Any
],
b : Annotated [ Any , tf . raw_ops . Any
],
transpose_a : bool = False ,
transpose_b : bool = False ,
a_is_sparse : bool = False ,
b_is_sparse : bool = False ,
name = None
) -> Annotated [ Any , tf . raw_ops . Any
]
Deprecated: THIS FUNCTION IS DEPRECATED. It will be removed in a future version.
Instructions for updating:
Use tf.linalg.matmul
instead
The inputs must be two-dimensional matrices and the inner dimension of "a" must
match the outer dimension of "b". Both "a" and "b" must be Tensor
s not
SparseTensor
s. This op is optimized for the case where at least one of "a" or
"b" is sparse, in the sense that they have a large proportion of zero values.
The breakeven for using this versus a dense matrix multiply on one platform was
30% zero values in the sparse matrix.
The gradient computation of this operation will only take advantage of sparsity
in the input gradient when that gradient comes from a Relu.
Args
a
A Tensor
. Must be one of the following types: float32
, bfloat16
.
b
A Tensor
. Must be one of the following types: float32
, bfloat16
.
transpose_a
An optional bool
. Defaults to False
.
transpose_b
An optional bool
. Defaults to False
.
a_is_sparse
An optional bool
. Defaults to False
.
b_is_sparse
An optional bool
. Defaults to False
.
name
A name for the operation (optional).
Returns
A Tensor
of type float32
.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates. Some content is licensed under the numpy license .
Last updated 2024-04-26 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"Missing the information I need"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"Too complicated / too many steps"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"Out of date"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"Samples / code issue"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
{"lastModified": "Last updated 2024-04-26 UTC."}
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-04-26 UTC."],[],[]]