Set the scale of raw features s.t. the input blob = input * scale. While Python represents images in [0, 1], certain Caffe models like CaffeNet and AlexNet represent images in [0, 255] so the raw_scale of these models must be 255. Parameters --------
(self, in_, scale)
| 219 | self.channel_swap[in_] = order |
| 220 | |
| 221 | def set_raw_scale(self, in_, scale): |
| 222 | """ |
| 223 | Set the scale of raw features s.t. the input blob = input * scale. |
| 224 | While Python represents images in [0, 1], certain Caffe models |
| 225 | like CaffeNet and AlexNet represent images in [0, 255] so the raw_scale |
| 226 | of these models must be 255. |
| 227 | |
| 228 | Parameters |
| 229 | ---------- |
| 230 | in_ : which input to assign this scale factor |
| 231 | scale : scale coefficient |
| 232 | """ |
| 233 | self.__check_input(in_) |
| 234 | self.raw_scale[in_] = scale |
| 235 | |
| 236 | def set_mean(self, in_, mean): |
| 237 | """ |
no test coverage detected