              bboxlist[i * 2] = self.softmax(bboxlist[i * 2], axis=1)
          for i in range(len(bboxlist) // 2):
              ocls, oreg = bboxlist[i * 2], bboxlist[i * 2 + 1]
              stride = 2 ** (i + 2)    # 4,8,16,32,64,128
              poss = zip(*np.where(ocls[:, 1, :, :] > 0.05))
              for _, hindex, windex in poss:
                  axc, ayc = stride / 2 + windex * stride, stride / 2 + hindex * stride
                  score = ocls[0, 1, hindex, windex]
                  if score >= self.confidence:
                      loc = np.ascontiguousarray(oreg[0, :, hindex, windex]).reshape((1, 4))
 
</s> remove             bboxlist[i * 2] = self.softmax(bboxlist[i * 2], axis=1)
 </s> add             bboxlist[i * 2] = self.softmax(bboxlist[i * 2], axis=3) </s> remove                 score = ocls[0, 1, hindex, windex]
 </s> add                 score = ocls[0, hindex, windex, 1] </s> remove                     loc = np.ascontiguousarray(oreg[0, :, hindex, windex]).reshape((1, 4))
 </s> add                     loc = np.ascontiguousarray(oreg[0, hindex, windex, :]).reshape((1, 4)) </s> remove         # TODO: do this nicer
        ldims = len(input_shape[0])
        rdims = len(input_shape[1])
        if ldims > rdims:
            return input_shape[0]
        if rdims > ldims:
            return input_shape[1]
        lprod = np.prod(list(filter(bool, input_shape[0])))
        rprod = np.prod(list(filter(bool, input_shape[1])))
        return input_shape[0 if lprod > rprod else 1]


class AddO2K(ElementwiseLayerO2K):
    """ Custom Keras Add layer generated by onnx2keras. """
    def call(self, inputs, **kwargs):  # pylint:disable=unused-argument
        """This is where the layer's logic lives.
 </s> add         norm = K.sqrt(K.sum(K.pow(inputs, 2), axis=-1, keepdims=True)) + 1e-10
        var_x = inputs / norm * self.w
        return var_x

    def get_config(self):
        """ Returns the config of the layer. </s> remove         config = super().get_config()
        config.update({
            'constant_obj': self._constant,
            'dtype': self._dtype
        })
        return config
 </s> add         name = "conv{}".format(idx)
        var_x = inputs
        for i in range(1, 3):
            rec_name = "{}_{}".format(name, i)
            size = 1 if i == 1 else 3
            if i == 2:
                var_x = ZeroPadding2D(1, name="{}.zeropad".format(rec_name))(var_x)
            var_x = Conv2D(filters * i,
                           kernel_size=size,
                           strides=i,
                           activation="relu",
                           name=rec_name)(var_x)
        return var_x
            poss = zip(*np.where(ocls[:, :, :, 1] > 0.05))
              bboxlist[i * 2] = self.softmax(bboxlist[i * 2], axis=1)
          for i in range(len(bboxlist) // 2):
              ocls, oreg = bboxlist[i * 2], bboxlist[i * 2 + 1]
              stride = 2 ** (i + 2)    # 4,8,16,32,64,128
            poss = zip(*np.where(ocls[:, :, :, 1] > 0.05))
              for _, hindex, windex in poss:
                  axc, ayc = stride / 2 + windex * stride, stride / 2 + hindex * stride
                  score = ocls[0, 1, hindex, windex]
                  if score >= self.confidence:
                      loc = np.ascontiguousarray(oreg[0, :, hindex, windex]).reshape((1, 4))
keep keep keep keep replace keep keep keep keep keep
 extract: S3FD - Convert to re-enable CPU 
plugins/extract/detect/s3fd.py