Skip to content

Layers

Custom layers used in our models

[source]

Conv2DNormalization

paz.models.layers.Conv2DNormalization(scale, axis=3)

Normalization layer as described in ParseNet paper.

Arguments

  • scale: Float determining how much to scale the features.
  • axis: Integer specifying axis of image channels.

Returns

Feature map tensor normalized with an L2 norm and then scaled.

References


[source]

SubtractScalar

paz.models.layers.SubtractScalar(constant)

Subtracts scalar value to tensor.

Arguments

  • constant: Float. Value to be subtracted to all tensor values.

[source]

ExpectedValue2D

paz.models.layers.ExpectedValue2D(axes=[2, 3])

Calculates the expected value along ''axes''.

Arguments

  • axes: List of integers. Axes for which the expected value will be calculated.

[source]

ExpectedDepth

paz.models.layers.ExpectedDepth(axes=[2, 3])

Calculates the expected depth along ''axes''. This layer takes two inputs. First input is a depth estimation tensor. Second input is a probability map of the keypoints. It multiplies both values and calculates the expected depth.

Arguments

  • axes: List of integers. Axes for which the expected value will be calculated.

[source]

ReduceMean

paz.models.layers.ReduceMean(axes=[1, 2], keepdims=True)

Wraps tensorflow's reduce_mean function into a keras layer.

Arguments

  • axes: List of integers. Axes along which mean is to be calculated.
  • keepdims: Bool, whether to presere the dimension or not.

[source]

Sigmoid

paz.models.layers.Sigmoid()

Wraps tensorflow's sigmoid function into a keras layer.


[source]

Add

paz.models.layers.Add()

Wraps tensorflow's add function into a keras layer.