layers

Custom layers that are needed for the various models.

class bpreveal.layers.LinearRegression(*args, **kwargs)

A simple layer that performs a linear regression on its inputs.

Implements the following formula:

out = input * slope + offset

where slope and offset are two (scalar) parameters.

Parameters:

kwargs – Passed to the keras Layer initializer.

call(inputs, *args, **kwargs)

Actually perform the calculation.

Variadic arguments are ignored.