Template Class TensorLambda¶
Defined in File tensor.h
Page Contents
Inheritance Relationships¶
Base Type¶
public torch::data::transforms::TensorTransform< Tensor >
(Template Class TensorTransform)
Class Documentation¶
-
template<typename Target = Tensor>
class TensorLambda : public torch::data::transforms::TensorTransform<Tensor>¶ A
Lambda
specialized for the typicalExample<Tensor, Tensor>
input type.Public Types
-
using FunctionType = std::function<Tensor(Tensor)>¶
Public Functions
-
inline explicit TensorLambda(FunctionType function)¶
Creates a
TensorLambda
from the givenfunction
.
-
inline virtual Tensor operator()(Tensor input) override¶
Applies the user-provided functor to the input tensor.
-
using FunctionType = std::function<Tensor(Tensor)>¶