1#ifndef CAFFE2_OPERATORS_BOOLEAN_MASK_OPS_H_
2#define CAFFE2_OPERATORS_BOOLEAN_MASK_OPS_H_
11template <
class Context>
15 template <
class...
Args>
22template <
class Context>
43template <
class Context>
65 "repeat_from_axis currently only supported in sequence mode.");
68 "repeat_from_axis and batch not currently supported together.");
70 this->
template GetSingleArgument<int>(
"repeat_from_axis", -1);
Args({2<< 5}) -> Args({2<< 8}) ->Args({2<< 12}) ->Args({2<< 14})
USE_OPERATOR_CONTEXT_FUNCTIONS
BooleanMaskOpGradient(const OperatorDef &operator_def, Workspace *ws)
bool RunOnDevice() override
USE_OPERATOR_CONTEXT_FUNCTIONS
BooleanMaskOp(Args &&... args)
bool RunOnDevice() override
bool HasArgument(const string &name) const
Checks if the operator has an argument of the given name.
T GetSingleArgument(const string &name, const T &default_value) const
const Tensor & Input(int idx, DeviceType type=Context::GetDeviceType())
Retrieve a non-owning reference to the input at position 'idx' for this operator.
USE_OPERATOR_CONTEXT_FUNCTIONS
bool RunOnDevice() override
SequenceMaskOp(const OperatorDef &operator_def, Workspace *ws)
Workspace is a class that holds all the related objects created during runtime: (1) all blobs,...
void forward(int64_t offset)
Copyright (c) 2016-present, Facebook, Inc.
d int long tensor contains the length in each of the output N dim Tensor where dim boolean false where packed_tensor is true otherwise Padding number in the packed segments Use true to pad infinity
C10_EXPORT const Argument & GetArgument(const OperatorDef &def, const string &name)
INT_MAX Subnet with blob bindings Indices of corresponding outer workspace in List of blobs from the forward Do int out bool
const ArgumentHelper args(def)
CAFFE_ENFORCE(dims.front() >=0, "Dimension ids must be non-negative.")