MCPcopy Create free account
hub / github.com/apache/singa / Setup

Method Setup

include/singa/io/transformer.h:43–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41class ImageTransformer: public Transformer {
42 public:
43 void Setup(const TransformerConf& conf) override {
44 featurewise_center_ = conf.featurewise_center();
45 featurewise_std_norm_ = conf.featurewise_std_norm();
46 resize_height_ = conf.resize_height();
47 resize_width_ = conf.resize_width();
48 rescale_ = conf.rescale();
49 horizontal_mirror_ = conf.horizontal_mirror();
50 image_dim_order_ = conf.image_dim_order();
51
52 /// if crop_shape not contain 2 elements, ignore crop option.
53 if (conf.crop_shape_size() == 2)
54 crop_shape_ = {conf.crop_shape(0), conf.crop_shape(1)};
55 }
56
57 Tensor Apply(int flag, Tensor& input) override;
58

Callers

nothing calls this directly

Calls 8

featurewise_centerMethod · 0.80
featurewise_std_normMethod · 0.80
resize_heightMethod · 0.80
resize_widthMethod · 0.80
rescaleMethod · 0.80
horizontal_mirrorMethod · 0.80
crop_shapeMethod · 0.80
image_dim_orderMethod · 0.45

Tested by

no test coverage detected