qkeras.ops_portable

Functions

bias_add_portable(x, bias[, data_format])

Portable replacement for bias_add_portable.

constant_bool_value(x)

Return a Python bool if x is statically known, else None.

is_nested(x)

to_python_bool_if_possible(x)

qkeras.ops_portable.bias_add_portable(x, bias, data_format='channels_last')[source]

Portable replacement for bias_add_portable.

Parameters:
  • x – input tensor, shape (N, H, W, C) if channels_last else (N, C, H, W)

  • bias – 1D tensor of shape (C,)

  • data_format – “channels_last” or “channels_first”

qkeras.ops_portable.constant_bool_value(x)[source]

Return a Python bool if x is statically known, else None.

qkeras.ops_portable.is_nested(x)[source]
qkeras.ops_portable.to_python_bool_if_possible(x)[source]