Skip to content

Activation

source

Activation(layer,fn=tx.identity,name="activation",**kwargs)

Applies the given function the the output of the input Layer.

Warning

if the input layer outputs a SparseTensor, this is converted to a dense Tensor first.

Args

  • input_layer (Layer) : input layer to which the activation function is applied
  • fn : a function that produces a Tensor and can be called on the tensor produced by the input layer
  • name : the layer name
  • kwargs : the keyword arguments passed to the given fn function

Methods:

.compute_shape

source

.compute_shape()

.compute

source

.compute(
   input_tensor
)

.reuse_with

source

.reuse_with(
   input_layer, name = None
)