Caffe2 - C++ API
A deep learning, cross platform ML framework
rnn_capable_operator_observer.h
1 
17 #pragma once
18 
19 #include "caffe2/core/net.h"
20 #include "caffe2/core/observer.h"
21 #include "caffe2/core/operator.h"
22 
23 namespace caffe2 {
24 
28 class RNNCapableOperatorObserver : public ObserverBase<OperatorBase> {
29  public:
32 
33  virtual std::unique_ptr<ObserverBase<OperatorBase>> rnnCopy(
34  OperatorBase* subject,
35  int rnn_order) const = 0;
36  virtual ~RNNCapableOperatorObserver(){};
37 
38  protected:
39  int rnn_order_ = OperatorBase::kNoNetPositionSet;
40 };
41 
42 } // namespace caffe2
Use this to implement a Observer using the Observer Pattern template.
Definition: observer.h:14
A global dictionary that holds information about what Caffe2 modules have been loaded in the current ...
Inherit to make your class observable.