Caffe2 - C++ API
A deep learning, cross platform ML framework
Public Member Functions
caffe2::Operator< Context > Class Template Reference
Inheritance diagram for caffe2::Operator< Context >:
caffe2::OperatorBase caffe2::Observable< OperatorBase > caffe2::AbstractLengthsGradientOp< T, TLengths, Context, ReducerGradient, GradientNeedIndices > caffe2::AbstractLengthsOp< TData, TLengths, Context, Reducer, SparseFused, InputAccessor > caffe2::AbstractLengthsWithMainInputAndForwardOutputGradientOp< T, TLengths, Context, ReducerGradient > caffe2::AbstractLengthsWithMainInputGradientOp< Tembedding, T, TLengths, Context, ReducerGradient, SparseFused, GradientNeedIndices > caffe2::AbstractReduceFrontOrBackGradientOp< T, Context, ReducerGradient, FirstDim > caffe2::AbstractReduceFrontOrBackOp< T, Context, Reducer, FirstDim, InputAccessor > caffe2::AbstractSortedSegmentGradientOp< T, SIndex, Context, ReducerGradient > caffe2::AbstractSortedSegmentOp< T, SIndex, Context, Reducer, SparseFused, InputAccessor > caffe2::AbstractSortedSegmentRangeGradientOp< T, SIndex, Context, RangeReducerGradient > caffe2::AbstractSortedSegmentRangeOp< T, SIndex, Context, RangeReducer, InputAccessor > caffe2::AbstractUnsortedSegmentGradientOp< T, SIndex, Context, ReducerGradient > caffe2::AbstractUnsortedSegmentOp< T, SIndex, Context, Reducer, SparseFused, InputAccessor > caffe2::AccumulateHistogramOp< T, Context > caffe2::AccumulateInputGradientOp< Context > caffe2::AccumulateOp< T, Context > caffe2::AccuracyOp< T, Context > caffe2::AdadeltaOp< Context > caffe2::AdagradOp< T, Context > caffe2::AdamOp< T, Context > caffe2::AddPaddingOp< Context > caffe2::AdjustBatchOp< Context > caffe2::AffineChannelGradientOp< T, Context > caffe2::AffineChannelOp< T, Context > caffe2::AliasOp< Context > caffe2::APMeterOp< T, Context > caffe2::ArgOp< Context, Reducer > caffe2::AssertOp< Context > caffe2::AtomicIterOp< Context > caffe2::BatchBoxCoxOp< Context > caffe2::BatchBucketizeOp< Context > caffe2::BatchBucketOneHotOp< Context > caffe2::BatchDenseToSparseOp< T, Context > caffe2::BatchGatherGradientOp< Context > caffe2::BatchGatherOp< Context > caffe2::BatchMatMulOp< Context, Engine > caffe2::BatchMomentsGradientOp< T, Context > caffe2::BatchMomentsOp< T, Context > caffe2::BatchOneHotOp< Context > caffe2::BatchPermutationGradientOp< T, Context > caffe2::BatchPermutationOp< T, Context > caffe2::BatchSparseToDenseOp< T, Context > caffe2::BBoxTransformOp< T, Context > caffe2::BernoulliJSDGradientOp< T, Context > caffe2::BernoulliJSDOp< T, Context > caffe2::BinaryElementwiseWithArgsGradientOp< InputTypes, Context, Functor, OutputTypeMap, GradientTypeMap > caffe2::BinaryElementwiseWithArgsOp< InputTypes, Context, Functor, OutputTypeMap > caffe2::BisectPercentileOp< Context > caffe2::BooleanMaskOp< Context > caffe2::BooleanUnmaskOp< Context > caffe2::BoxWithNMSLimitOp< Context > caffe2::ByteWeightDequantOp< Context > caffe2::CastOp< Context > caffe2::CeilOp< T, Context > caffe2::ChannelBackpropStatsOp< Context > caffe2::ChannelShuffleGradientOp< T, Context > caffe2::ChannelShuffleOp< T, Context > caffe2::ChannelStatsOp< Context > caffe2::CheckCounterDoneOp< T, Context > caffe2::CheckpointOp< Context > caffe2::ClipGradientOp< T, Context > caffe2::ClipOp< T, Context > caffe2::ClipTensorByScalingOp< Context > caffe2::CloseBlobsQueueOp< Context > caffe2::Col2ImOp< T, Context > caffe2::CollectAndDistributeFpnRpnProposalsOp< Context > caffe2::ConcatOp< Context > caffe2::ConditionalOp< Context > caffe2::ConvPoolOpBase< Context > caffe2::ConvTransposeUnpoolBase< Context > caffe2::CopyOp< Context, DstContext, SrcContext > caffe2::CosineEmbeddingCriterionGradientOp< Context > caffe2::CosineEmbeddingCriterionOp< Context > caffe2::CosineSimilarityGradientOp< T, Context > caffe2::CosineSimilarityOp< T, Context > caffe2::CountDownOp< T, Context > caffe2::CountUpOp< T, Context > caffe2::CreateBlobsQueueOp< Context > caffe2::CreateCounterOp< T, Context > caffe2::CreateDBOp< Context > caffe2::CreateMapOp< Context > caffe2::CreateScopeOp< Context > caffe2::CrossEntropyGradientOp< T, Context > caffe2::CrossEntropyOp< T, Context > caffe2::CTCBeamSearchDecoderOp< Context > caffe2::CTCGreedyDecoderOp< Context > caffe2::DataCoupleOp< Context > caffe2::DBExistsOp< Context > caffe2::DenseVectorToIdListOp< Context > caffe2::DequeueBlobsOp< Context > caffe2::detail::C10OperatorWrapper< Context > caffe2::DoOp< Context > caffe2::DotProductGradientOp< T, Context > caffe2::DotProductOp< T, Context > caffe2::DotProductWithPaddingGradientOp< T, Context > caffe2::DotProductWithPaddingOp< T, Context > caffe2::DropoutGradientOp< T, Context > caffe2::DropoutOp< T, Context > caffe2::ElementwiseLinearGradientOp< T, Context, Engine > caffe2::ElementwiseLinearOp< T, Context, Engine > caffe2::EnforceFiniteOp< Context > caffe2::EnqueueBlobsOp< Context > caffe2::EnsureClippedOp< T, Context > caffe2::EnsureCPUOutputOp< Context > caffe2::EnsureDenseOp< Context > caffe2::ExpandDimsOp< Context > caffe2::ExpandGradientOp< InputTypes, Context > caffe2::ExpandOp< InputTypes, Context > caffe2::FeedBlobOp< Context > caffe2::FileStoreHandlerCreateOp< Context > caffe2::FillerOp< Context > caffe2::FindDuplicateElementsOp< Context > caffe2::FindOp< Context > caffe2::FlattenOp< Context > caffe2::FlattenToVecOp< Context > caffe2::FlexibleTopKGradientOp< T, Context > caffe2::FlexibleTopKOp< T, Context > caffe2::FloatToFused8BitRowwiseQuantizedOp< T, convert, Context > caffe2::FloatToFusedRandRowwiseQuantizedOp< Context > caffe2::FloatToHalfOp< Context > caffe2::FloatToRowwiseQuantized8BitsOp< Context > caffe2::FloorOp< T, Context > caffe2::FP16MomentumSGDUpdateOp< T, Context > caffe2::FP32MomentumSGDUpdateOp< T, Context > caffe2::FreeOp< Context > caffe2::FtrlOp< T, Context > caffe2::FullyConnectedDecompGradientOp< T, Context, Engine > caffe2::FullyConnectedFakeLowpFPOp< Q, Context, Engine, TransposeWeight > caffe2::FullyConnectedGradientFakeLowpFPOp< Q, Context, Engine, TransposeWeight > caffe2::FullyConnectedGradientOp< Context, Engine, TransposeWeight > caffe2::FullyConnectedOp< Context, Engine, TransposeWeight > caffe2::FullyConnectedOp_SPARSE< T, Context, Engine > caffe2::FullyConnectedOpDecomp< T, Context, Engine > caffe2::FullyConnectedOpPrune< T, Context, Engine > caffe2::FullyConnectedPruneGradientOp< T, Context, Engine > caffe2::FunHashGradientOp< T, Context > caffe2::FunHashOp< T, Context > caffe2::Fused8BitRowwiseQuantizedToFloatOp< T, convert, Context > caffe2::FusedRandRowwiseQuantizedToFloatOp< Context > caffe2::GatherFused8BitRowwiseOp< Context > caffe2::GatherOp< Context > caffe2::GatherPaddingOp< Context > caffe2::GatherRangesOp< Context > caffe2::GatherRangesToDenseOp< Context > caffe2::GenerateProposalsOp< Context > caffe2::GFtrlOp< T, Context > caffe2::GluOp< T, Context > caffe2::GroupNormGradientOp< T, Context > caffe2::GroupNormOp< T, Context > caffe2::GroupSpatialSoftmaxGradientOp< T, Context > caffe2::GroupSpatialSoftmaxOp< T, Context > caffe2::GRUUnitGradientOp< T, Context > caffe2::GRUUnitOp< T, Context > caffe2::HalfToFloatOp< Context > caffe2::HasElementsOp< Context > caffe2::HasScopeOp< Context > caffe2::HeatmapMaxKeypointOp< T, Context > caffe2::HSoftmaxOpBase< T, Context > caffe2::HuffmanTreeHierarchyOp< T, Context > caffe2::IfOp< Context > caffe2::Im2ColOp< T, Context > caffe2::IndexHashOp< Context > caffe2::InstanceNormGradientOp< T, Context > caffe2::InstanceNormOp< T, Context > caffe2::IntegralImageGradientOp< T, Context > caffe2::IntegralImageOp< T, Context > caffe2::IsEmptyOp< Context > caffe2::IsMemberOfOp< Context > caffe2::IsNanOp< Context > caffe2::IterOp< Context > caffe2::KeySplitOp< T, Context > caffe2::KeyValueToMapOp< Context > caffe2::L1DistanceGradientOp< T, Context > caffe2::L1DistanceOp< T, Context > caffe2::LabelCrossEntropyGradientOp< T, Context > caffe2::LabelCrossEntropyOp< T, Context > caffe2::LambdaRankNdcgGradientOp< T, Context > caffe2::LambdaRankNdcgOp< T, Context > caffe2::LarsOp< T, Context > caffe2::LayerNormGradientOp< Context > caffe2::LayerNormOp< Context > caffe2::LeakyReluGradientOp< T, Context > caffe2::LeakyReluOp< T, Context > caffe2::LearningRateAdaptionOp< T, Context > caffe2::LearningRateOp< T, Context > caffe2::LengthsGatherOp< Context > caffe2::LengthsPadOp< Context > caffe2::LengthsRangeFillOp< Context > caffe2::LengthsSplitOp< Context > caffe2::LengthsTileOp< Context > caffe2::LengthsTopKGradientOp< T, Context > caffe2::LengthsTopKOp< T, Context > caffe2::LengthsToRangesOp< Context > caffe2::LengthsToSegmentIdsOp< Context > caffe2::LengthsToShapeOp< Context > caffe2::LengthsToWeightsOp< Context > caffe2::LoadOp< Context > caffe2::LogitGradientOp< T, Context > caffe2::LpNormGradientOp< T, Context > caffe2::LpNormOp< T, Context > caffe2::LRNOpBase< T, Context > caffe2::LSTMUnitGradientOp< Context > caffe2::LSTMUnitOp< Context > caffe2::MakeTwoClassGradientOp< T, Context > caffe2::MakeTwoClassOp< T, Context > caffe2::MapToKeyValueOp< Context > caffe2::MarginRankingCriterionGradientOp< Context > caffe2::MarginRankingCriterionOp< Context > caffe2::MatMulOp< T, Context, Engine > caffe2::MaxOp< T, Context > caffe2::MaxReduceDimsGradientOp< T, Context, FIRSTDIMS > caffe2::MaxReduceDimsOp< T, Context, FIRSTDIMS > caffe2::MaxReductionGradientOp< T, Context, ROWWISE > caffe2::MaxReductionOp< T, Context, ROWWISE > caffe2::MeanGradientOp< Context > caffe2::MeanOp< Context > caffe2::MergeDimOp< Context > caffe2::MergeIdListsOp< Context > caffe2::MergeMultiListFeatureTensorsOp< Context > caffe2::MergeMultiListOrMapFeatureTensorsGradientOp< Context > caffe2::MergeMultiMapFeatureTensorsOp< Context > caffe2::MergeMultiScalarFeatureTensorsGradientOp< Context > caffe2::MergeMultiScalarFeatureTensorsOp< Context > caffe2::MergeSingleListFeatureTensorsOp< Context > caffe2::MergeSingleListOrMapFeatureTensorsGradientOp< Context > caffe2::MergeSingleMapFeatureTensorsOp< Context > caffe2::MergeSingleScalarFeatureTensorsGradientOp< Context > caffe2::MergeSingleScalarFeatureTensorsOp< Context > caffe2::MinOp< T, Context > caffe2::ModOp< Context > caffe2::MomentsGradientOp< T, Context > caffe2::MomentsOp< T, Context > caffe2::MomentumSGDOp< T, Context > caffe2::MomentumSGDUpdateOp< T, Context > caffe2::MultiClassAccuracyOp< T, Context > caffe2::NanCheckOp< Context > caffe2::NCHW2NHWCOp< T, Context > caffe2::NegateGradientOp< Context > caffe2::NGramFromCategoricalOp< F, T, Context > caffe2::NHWC2NCHWOp< T, Context > caffe2::NoDefaultEngineOp< Context > caffe2::NormalizeGradientOp< T, Context > caffe2::NormalizeL1Op< T, Context > caffe2::NormalizeOp< T, Context > caffe2::NumpyTileOp< Context > caffe2::OneHotOp< Context > caffe2::OnnxifiOp< T, Context > caffe2::ONNXWhileOp< Context > caffe2::PackRNNSequenceOpBase< Context, Forward > caffe2::PackSegmentsOp< Context > caffe2::PadEmptySamplesOp< Context > caffe2::PairWiseLossGradientOp< T, Context > caffe2::PairWiseLossOp< T, Context > caffe2::PercentileOp< Context > caffe2::PerplexityOp< T, Context > caffe2::PiecewiseLinearTransformOp< T, Context > caffe2::PowOp< InputTypes, Context, Functor, TypeMap > caffe2::PReluGradientOp< T, Context > caffe2::PReluOp< T, Context > caffe2::PrependDimOp< Context > caffe2::PrintOp< Context > caffe2::PSRoIPoolGradientOp< T, Context > caffe2::PSRoIPoolOp< T, Context > caffe2::RangeOp< Context > caffe2::RecurrentNetworkBlobFetcherOp< Context > caffe2::RecurrentNetworkGradientOp< Context > caffe2::RecurrentNetworkOp< Context > caffe2::RedisStoreHandlerCreateOp< Context > caffe2::ReduceGradientOp< InputTypes, Context, Reducer > caffe2::ReduceOp< InputTypes, Context, Reducer > caffe2::ReduceTailSumOp< T, Context > caffe2::RemoveDataBlocksOp< Context > caffe2::RemovePaddingOp< Context > caffe2::ReplaceNaNOp< Context > caffe2::ResetCounterOp< T, Context > caffe2::ReshapeOp< F, Context > caffe2::ResizeLikeOp< Context > caffe2::ResizeNearestGradientOp< T, Context > caffe2::ResizeNearestOp< T, Context > caffe2::RetrieveCountOp< T, Context > caffe2::ReversePackedSegsOp< Context > caffe2::RMACRegionsOp< Context > caffe2::RmsPropOp< T, Context > caffe2::RNNApplyLinkOp< Context > caffe2::RoIAlignGradientOp< T, Context > caffe2::RoIAlignOp< T, Context > caffe2::RoIAlignRotatedGradientOp< T, Context > caffe2::RoIAlignRotatedOp< T, Context > caffe2::RoIPoolFGradientOp< T, Context > caffe2::RoIPoolFOp< T, Context > caffe2::RoIPoolGradientOp< T, Context > caffe2::RoIPoolOp< T, Context > caffe2::RowMulOp< T, Context > caffe2::Rowwise8BitQuantizedToFloatOp< Context > caffe2::RowWiseSparseAdagradOp< T, Context > caffe2::RowWiseSparseAdamOp< T, Context > caffe2::SafeDequeueBlobsOp< Context > caffe2::SafeEnqueueBlobsOp< Context > caffe2::SampleAsGradientOp< T, Context > caffe2::SampleAsOp< T, Context > caffe2::SaveOp< Context > caffe2::ScaleOp< Context > caffe2::ScatterAssignOp< Context > caffe2::ScatterWeightedSumOp< T, Context > caffe2::SegmentIdsToLengthsOp< Context > caffe2::SegmentIdsToRangesOp< Context > caffe2::SelectGradientOpBase< T, Context > caffe2::SelectSmoothL1LossGradientOp< T, Context > caffe2::SelectSmoothL1LossOp< T, Context > caffe2::SeluGradientOp< T, Context > caffe2::SeluOp< T, Context > caffe2::SequenceMaskOp< Context > caffe2::ShapeOp< Context > caffe2::SigmoidCrossEntropyLossGradientOp< T, Context > caffe2::SigmoidCrossEntropyLossOp< T, Context > caffe2::SigmoidCrossEntropyWithLogitsGradientOp< T, Context > caffe2::SigmoidCrossEntropyWithLogitsOp< T, Context > caffe2::SigmoidFocalLossGradientOp< T, Context > caffe2::SigmoidFocalLossOp< T, Context > caffe2::SinusoidPositionEncodingOp< Context > caffe2::SizeOp< Context > caffe2::SliceGradientOp< Context > caffe2::SliceOp< Context > caffe2::SmoothL1LossGradientOp< T, Context > caffe2::SmoothL1LossOp< T, Context > caffe2::SoftmaxFocalLossGradientOp< T, Context > caffe2::SoftmaxFocalLossOp< T, Context > caffe2::SoftmaxGradientOp< T, Context > caffe2::SoftmaxOp< T, Context > caffe2::SoftmaxWithLossGradientOp< T, Context > caffe2::SoftmaxWithLossOp< T, Context > caffe2::SoftplusGradientOp< T, Context > caffe2::SoftplusOp< T, Context > caffe2::SpaceBatchOpBase< Context > caffe2::SparseAdadeltaOp< Context > caffe2::SparseAdagradOp< T, Context > caffe2::SparseAdamOp< T, Context > caffe2::SparseFunHashGradientOp< T, Context > caffe2::SparseFunHashOp< T, Context > caffe2::SparseLengths8BitsRowwiseOp< Context, USE_WEIGHTS, USE_MEAN, OutDataT > caffe2::SparseLengthsFused8BitRowwiseOp< Context, with_weights, is_mean > caffe2::SparseMatrixReshapeOp< Context > caffe2::SparseMomentumSGDUpdateOp< T, Context > caffe2::SparseNormalizeOp< T, Context > caffe2::SparseToDenseMaskBase< Context > caffe2::SparseToDenseOp< Context > caffe2::SparseWngradOp< T, Context > caffe2::SpatialBNGradientOp< Context > caffe2::SpatialBNOp< Context > caffe2::SpatialNarrowAsGradientOp< Context > caffe2::SpatialNarrowAsOp< Context > caffe2::SpatialSoftmaxWithLossGradientOp< T, Context > caffe2::SpatialSoftmaxWithLossOp< T, Context > caffe2::SplitByLengthsOp< Context > caffe2::SplitOp< Context > caffe2::SquaredL2DistanceGradientOp< T, Context > caffe2::SquaredL2DistanceOp< T, Context > caffe2::SquareRootDivideOp< Context > caffe2::SqueezeOp< Context > caffe2::StopGradientOp< Context > caffe2::StringJoinOp< Context > caffe2::StumpFuncIndexOp< TIN, TOUT, Context > caffe2::StumpFuncOp< TIN, TOUT, Context > caffe2::SumElementsGradientOp< T, Context > caffe2::SumElementsIntOp< T, Context > caffe2::SumElementsOp< T, Context > caffe2::SummarizeOp< T, Context > caffe2::SumOp< Context > caffe2::SumReduceDimsGradientOp< Context, FIRSTDIMS, NORMALIZE > caffe2::SumReduceDimsOp< Context, FIRSTDIMS, NORMALIZE > caffe2::SumReduceLikeOp< Context > caffe2::SumSqrElementsOp< Context > caffe2::SwishGradientOp< Context > caffe2::ThresholdedReluGradientOp< T, Context > caffe2::ThresholdedReluOp< T, Context > caffe2::TileGradientOp< Context > caffe2::TileOp< Context > caffe2::TopKGradientOp< T, Context > caffe2::TopKOp< T, Context > caffe2::TransposeOp< Context > caffe2::TTContractionGradientOp< T, Context, Engine > caffe2::TTContractionOp< T, Context, Engine > caffe2::TTLinearGradientOp< T, Context, Engine > caffe2::TTLinearOp< T, Context, Engine > caffe2::TTPadGradientOp< T, Context, Engine > caffe2::TTPadOp< T, Context, Engine > caffe2::UnaryElementwiseWithArgsOp< InputTypes, Context, Functor, OutputTypeMap > caffe2::UniqueOp< Context > caffe2::UnpackSegmentsOp< Context > caffe2::UpsampleBilinearGradientOp< T, Context > caffe2::UpsampleBilinearOp< T, Context > caffe2::UpsampleNearestGradientOp< T, Context > caffe2::UpsampleNearestOp< T, Context > caffe2::VariableLengthSequencePaddingOp< T, Context > caffe2::WallClockTimeOp< Context > caffe2::WeightedMultiSamplingOp< Context > caffe2::WeightedSampleDequeueBlobsOp< Context > caffe2::WeightedSampleOp< T, Context > caffe2::WeightedSigmoidCrossEntropyWithLogitsGradientOp< T, Context > caffe2::WeightedSigmoidCrossEntropyWithLogitsOp< T, Context > caffe2::WeightedSumGradientOp< Context > caffe2::WeightedSumOp< Context > caffe2::WhereOp< Context > caffe2::WhileOp< Context > caffe2::WngradOp< T, Context > caffe2::YellowFinOp< T, Context > caffe2::ZeroGradientOp< Context >

Public Member Functions

 Operator (const OperatorDef &operator_def, Workspace *ws)
 
 Operator (const c10::FunctionSchema &fn_schema, std::vector< c10::IValue > inputs, std::vector< at::Tensor > outputs)
 
const TensorInput (int idx, DeviceType type=Context::GetDeviceType())
 Retrieve a non-owning reference to the input at position 'idx' for this operator. More...
 
Tensor XOutput (int idx, at::IntArrayRef dims, at::TensorOptions options)
 XOutput is a modernized version of Output which returns a Tensor rather than a Tensor* (the raw pointer in the latter case is useless, as Tensor is a pointer type.)
 
- Public Member Functions inherited from caffe2::OperatorBase
 OperatorBase (const OperatorDef &operator_def, Workspace *ws)
 
 OperatorBase (const c10::FunctionSchema &schema, std::vector< c10::IValue > inputs, std::vector< at::Tensor > outputs)
 
bool isLegacyOperator () const
 Return true if the operator was instantiated with OperatorDef New operators should be instantiated with FunctionSchema.
 
const c10::FunctionSchemagetFunctionSchema () const
 
bool HasArgument (const string &name) const
 Checks if the operator has an argument of the given name.
 
template<typename T >
T GetSingleArgument (const string &name, const T &default_value) const
 
template<typename T >
bool HasSingleArgumentOfType (const string &name) const
 
template<typename T >
vector< TGetVectorFromIValueList (const c10::IValue &value) const
 
template<typename T >
vector< TGetRepeatedArgument (const string &name, const vector< T > &default_value={}) const
 
template<typename T >
const TInput (int idx)
 
template<typename T >
const TInput (int idx, DeviceType type)
 
template<typename T >
TOutput (int idx)
 
template<typename T >
TOutput (int idx, DeviceType type)
 
Tensor XOutputTensor (int idx, at::IntArrayRef dims, at::TensorOptions options)
 
void SetOutputTensor (int idx, Tensor tensor)
 
Tensor OutputTensorOrUndefined (int idx)
 
TensorOutputTensor (int idx, at::IntArrayRef dims, at::TensorOptions options)
 
TensorOutputTensorCopyFrom (int idx, at::TensorOptions options, const Tensor &src, bool async=false)
 
TensorOutputTensorAlias (int idx, const Tensor &src)
 
template<typename T >
TOutput (int idx, T *allocated)
 
const BlobInputBlob (int idx)
 
BlobOutputBlob (int idx)
 
bool IsInputOutputAlias (int i, int j)
 
template<typename T >
bool InputIsType (int idx)
 
bool InputIsTensorType (int idx, DeviceType device_type)
 
template<typename T >
bool OutputIsType (int idx)
 
bool OutputIsTensorType (int idx, DeviceType type)
 
int InputSize () const
 
int OutputSize () const
 
const vector< const Blob * > & Inputs () const
 
const vector< Blob * > & Outputs ()
 
vector< TensorShape > InputTensorShapes () const
 
virtual void WaitEvent (const Event &ev, int=-1)
 
void Wait (const OperatorBase &other, int stream_id=-1)
 
virtual void WaitEvents (const std::vector< const Event * > &events, int=-1)
 
virtual void Finish ()
 
virtual bool Run (int=0)
 
virtual bool HasAsyncPart () const
 
virtual bool SupportsAsyncScheduling () const
 
virtual bool RunAsync (int stream_id=0)
 
virtual void AddRelatedBlobInfo (EnforceNotMet *err)
 
const OperatorDef & debug_def () const
 
void set_debug_def (const std::shared_ptr< const OperatorDef > &operator_def)
 
bool has_debug_def () const
 
void RecordLastFailedOpNetPosition ()
 
int net_position () const
 
void set_net_position (int idx)
 
const DeviceOption & device_option () const
 
const Eventevent () const
 
Eventevent ()
 
void ResetEvent ()
 
void DisableEvent ()
 
bool IsEventDisabled () const
 
virtual void SyncDeviceBarrierForObservers ()
 
virtual bool IsStreamFree (int) const
 
const std::string & type () const
 
void annotate_engine (const std::string &engine)
 
const std::string & engine () const
 
void SetExecutorHelper (ExecutorHelper *helper)
 
ExecutorHelperGetExecutorHelper () const
 
std::vector< at::Tensormove_newstyle_outputs ()&&
 
template<>
NetDef GetSingleArgument (const std::string &name, const NetDef &default_value) const
 
template<>
vector< int > GetVectorFromIValueList (const c10::IValue &value) const
 
template<>
vector< float > GetVectorFromIValueList (const c10::IValue &value) const
 
template<>
vector< string > GetVectorFromIValueList (const c10::IValue &value) const
 
- Public Member Functions inherited from caffe2::Observable< OperatorBase >
 Observable (Observable &&)=default
 
Observableoperator= (Observable &&)=default
 
 C10_DISABLE_COPY_AND_ASSIGN (Observable)
 
const ObserverAttachObserver (std::unique_ptr< Observer > observer)
 
std::unique_ptr< ObserverDetachObserver (const Observer *observer_ptr)
 Returns a unique_ptr to the removed observer. More...
 
virtual size_t NumObservers ()
 
void StartAllObservers ()
 
void StopAllObservers ()
 

Additional Inherited Members

- Public Types inherited from caffe2::Observable< OperatorBase >
using Observer = ObserverBase< OperatorBase >
 
- Static Public Attributes inherited from caffe2::OperatorBase
static const int kNoNetPositionSet = -1
 
- Protected Member Functions inherited from caffe2::OperatorBase
virtual void RecordEvent (const char *=nullptr)
 
void SetEventFinished (const char *err_msg=nullptr)
 
void SetEventFinishedWithException (const char *err_msg=nullptr)
 
std::string getErrorMsg ()
 
 C10_DISABLE_COPY_AND_ASSIGN (OperatorBase)
 
- Protected Attributes inherited from caffe2::OperatorBase
std::unique_ptr< Eventevent_
 
- Protected Attributes inherited from caffe2::Observable< OperatorBase >
std::vector< std::unique_ptr< Observer > > observers_list_
 

Detailed Description

template<class Context>
class caffe2::Operator< Context >

Definition at line 677 of file operator.h.

Member Function Documentation

template<class Context>
const Tensor& caffe2::Operator< Context >::Input ( int  idx,
DeviceType  type = Context::GetDeviceType() 
)
inline

Retrieve a non-owning reference to the input at position 'idx' for this operator.

The returned reference is valid for the duration of the RunOnDevice call. The optional 'type' parameter can be used to assert a required device type for the input (by default, we assert that the tensor is consistent with the device type implied by the Context parameter of an Operator.)

Definition at line 702 of file operator.h.


The documentation for this class was generated from the following file: