mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-07-07 21:51:47 +08:00
Fix docs build.
This commit is contained in:
parent
f169c13d8e
commit
cc0be00435
@ -92,7 +92,7 @@ TensorMap<Tensor<float, 1>> t_12(t_4x3.data(), 12);
|
|||||||
|
|
||||||
#### Class TensorRef
|
#### Class TensorRef
|
||||||
|
|
||||||
See [Assigning to a TensorRef.](#assigning-to-a-tensorref)
|
See **Assigning to a `TensorRef`**.
|
||||||
|
|
||||||
## Accessing Tensor Elements
|
## Accessing Tensor Elements
|
||||||
|
|
||||||
@ -602,8 +602,8 @@ std::cout << "Size: " << a.size();
|
|||||||
A few operations provide `dimensions()` directly,
|
A few operations provide `dimensions()` directly,
|
||||||
e.g. `TensorReslicingOp`. Most operations defer calculating dimensions
|
e.g. `TensorReslicingOp`. Most operations defer calculating dimensions
|
||||||
until the operation is being evaluated. If you need access to the dimensions
|
until the operation is being evaluated. If you need access to the dimensions
|
||||||
of a deferred operation, you can wrap it in a TensorRef (see
|
of a deferred operation, you can wrap it in a `TensorRef` (see
|
||||||
[Assigning to a TensorRef.](#assigning-to-a-tensorref)), which provides
|
**Assigning to a TensorRef** above), which provides
|
||||||
`dimensions()` and `dimension()` as above.
|
`dimensions()` and `dimension()` as above.
|
||||||
|
|
||||||
`TensorRef` can also wrap the plain `Tensor` types, so this is a useful idiom in
|
`TensorRef` can also wrap the plain `Tensor` types, so this is a useful idiom in
|
||||||
@ -848,7 +848,7 @@ These can be chained: you can apply another `Tensor` Operation to the value
|
|||||||
returned by the method.
|
returned by the method.
|
||||||
|
|
||||||
The chain of Operation is evaluated lazily, typically when it is assigned to a
|
The chain of Operation is evaluated lazily, typically when it is assigned to a
|
||||||
tensor. See [Controlling When Expression are Evaluated](#controlling-when-expression-are-evaluated) for more details about
|
tensor. See **Controlling When Expression are Evaluated** for more details about
|
||||||
their evaluation.
|
their evaluation.
|
||||||
|
|
||||||
### (Operation) constant(const Scalar& val)
|
### (Operation) constant(const Scalar& val)
|
||||||
@ -858,7 +858,7 @@ where all elements have the value `val`.
|
|||||||
|
|
||||||
This is useful, for example, when you want to add or subtract a constant from a
|
This is useful, for example, when you want to add or subtract a constant from a
|
||||||
tensor, or multiply every element of a tensor by a scalar.
|
tensor, or multiply every element of a tensor by a scalar.
|
||||||
However, such operations can also be performed using operator overloads (see [operator+](#operation-operator-scalar-s)).
|
However, such operations can also be performed using operator overloads (see `operator+`).
|
||||||
|
|
||||||
|
|
||||||
```cpp
|
```cpp
|
||||||
@ -1049,7 +1049,7 @@ Divides every element in the tensor by `s`.
|
|||||||
Computes the element-wise modulus (remainder) of each tensor element divided by `s`
|
Computes the element-wise modulus (remainder) of each tensor element divided by `s`
|
||||||
|
|
||||||
**Only integer types are supported.**
|
**Only integer types are supported.**
|
||||||
For floating-point tensors, implement a [unaryExpr](#operation-unaryexprcustomunaryop-func) using `std::fmod`.
|
For floating-point tensors, implement a `unaryExpr` using `std::fmod`.
|
||||||
|
|
||||||
### (Operation) cwiseMax(Scalar threshold)
|
### (Operation) cwiseMax(Scalar threshold)
|
||||||
Returns the coefficient-wise maximum between two tensors.
|
Returns the coefficient-wise maximum between two tensors.
|
||||||
@ -1448,7 +1448,7 @@ std::cout << "Flat argmax index: " << argmax_flat();
|
|||||||
|
|
||||||
### (Operation) argmin(const Dimensions& reduction_dim)
|
### (Operation) argmin(const Dimensions& reduction_dim)
|
||||||
### (Operation) argmin()
|
### (Operation) argmin()
|
||||||
See [argmax](#operation-argmaxconst-dimensions-reduction_dim)
|
See `argmax`.
|
||||||
|
|
||||||
### (Operation) reduce(const Dimensions& reduction_dims, const Reducer& reducer)
|
### (Operation) reduce(const Dimensions& reduction_dims, const Reducer& reducer)
|
||||||
|
|
||||||
@ -2277,7 +2277,7 @@ std::cout << "b\n" << b << "\n";
|
|||||||
```
|
```
|
||||||
|
|
||||||
### (Operation) eval()
|
### (Operation) eval()
|
||||||
See [Calling eval()](#calling-eval)
|
See **Calling eval()**.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -2340,7 +2340,7 @@ For example `Tensor<T, N>::maximum()` returns a `Tensor<T, 0>`.
|
|||||||
|
|
||||||
Similarly, the inner product of 2 1d tensors (through contractions) returns a 0d tensor.
|
Similarly, the inner product of 2 1d tensors (through contractions) returns a 0d tensor.
|
||||||
|
|
||||||
The scalar value can be extracted as explained in [Reduction along all dimensions](#reduction-along-all-dimensions).
|
The scalar value can be extracted as explained in **Reduction along all dimensions**.
|
||||||
|
|
||||||
|
|
||||||
## Limitations
|
## Limitations
|
||||||
|
Loading…
x
Reference in New Issue
Block a user