@@ -31,7 +31,7 @@ class Input : public Network {
31
31
Input (const STRING& name, const StaticShape& shape);
32
32
virtual ~Input ();
33
33
34
- virtual STRING spec () const {
34
+ STRING spec () const override {
35
35
STRING spec;
36
36
spec.add_str_int (" " , shape_.batch ());
37
37
spec.add_str_int (" ," , shape_.height ());
@@ -41,41 +41,41 @@ class Input : public Network {
41
41
}
42
42
43
43
// Returns the required shape input to the network.
44
- virtual StaticShape InputShape () const { return shape_; }
44
+ StaticShape InputShape () const override { return shape_; }
45
45
// Returns the shape output from the network given an input shape (which may
46
46
// be partially unknown ie zero).
47
- virtual StaticShape OutputShape (const StaticShape& input_shape) const {
47
+ StaticShape OutputShape (const StaticShape& input_shape) const override {
48
48
return shape_;
49
49
}
50
50
// Writes to the given file. Returns false in case of error.
51
51
// Should be overridden by subclasses, but called by their Serialize.
52
- virtual bool Serialize (TFile* fp) const ;
52
+ bool Serialize (TFile* fp) const override ;
53
53
// Reads from the given file. Returns false in case of error.
54
- virtual bool DeSerialize (TFile* fp);
54
+ bool DeSerialize (TFile* fp) override ;
55
55
56
56
// Returns an integer reduction factor that the network applies to the
57
57
// time sequence. Assumes that any 2-d is already eliminated. Used for
58
58
// scaling bounding boxes of truth data.
59
59
// WARNING: if GlobalMinimax is used to vary the scale, this will return
60
60
// the last used scale factor. Call it before any forward, and it will return
61
61
// the minimum scale factor of the paths through the GlobalMinimax.
62
- virtual int XScaleFactor () const ;
62
+ int XScaleFactor () const override ;
63
63
64
64
// Provides the (minimum) x scale factor to the network (of interest only to
65
65
// input units) so they can determine how to scale bounding boxes.
66
- virtual void CacheXScaleFactor (int factor);
66
+ void CacheXScaleFactor (int factor) override ;
67
67
68
68
// Runs forward propagation of activations on the input line.
69
69
// See Network for a detailed discussion of the arguments.
70
- virtual void Forward (bool debug, const NetworkIO& input,
71
- const TransposedArray* input_transpose,
72
- NetworkScratch* scratch, NetworkIO* output);
70
+ void Forward (bool debug, const NetworkIO& input,
71
+ const TransposedArray* input_transpose,
72
+ NetworkScratch* scratch, NetworkIO* output) override ;
73
73
74
74
// Runs backward propagation of errors on the deltas line.
75
75
// See Network for a detailed discussion of the arguments.
76
- virtual bool Backward (bool debug, const NetworkIO& fwd_deltas,
77
- NetworkScratch* scratch,
78
- NetworkIO* back_deltas);
76
+ bool Backward (bool debug, const NetworkIO& fwd_deltas,
77
+ NetworkScratch* scratch,
78
+ NetworkIO* back_deltas) override ;
79
79
// Creates and returns a Pix of appropriate size for the network from the
80
80
// image_data. If non-null, *image_scale returns the image scale factor used.
81
81
// Returns nullptr on error.
0 commit comments