Exemplo n.º 1
0
  def call(self, inputs, training=None):
    outputs = K.depthwise_conv2d(
        inputs,
        self.depthwise_kernel,
        strides=self.strides,
        padding=self.padding,
        dilation_rate=self.dilation_rate,
        data_format=self.data_format)

    if self.bias:
      outputs = K.bias_add(outputs, self.bias, data_format=self.data_format)

    if self.activation is not None:
      return self.activation(outputs)

    return outputs
Exemplo n.º 2
0
    def call(self, inputs, training=None):
        outputs = K.depthwise_conv2d(inputs,
                                     self.depthwise_kernel,
                                     strides=self.strides,
                                     padding=self.padding,
                                     dilation_rate=self.dilation_rate,
                                     data_format=self.data_format)

        if self.bias:
            outputs = K.bias_add(outputs,
                                 self.bias,
                                 data_format=self.data_format)

        if self.activation is not None:
            return self.activation(outputs)

        return outputs