megnet.layers.readout.linear module

Linear readout layer includes stats calculated on the atom dimension

class LinearWithIndex(*args, **kwargs)[source]

Bases: keras.engine.base_layer.Layer

Sum or average the node/edge attributes to get a structure-level vector

Parameters
  • mode – (str) ‘mean’, ‘sum’, ‘max’, ‘mean’ or ‘prod’

  • **kwargs

build(input_shape)[source]

Build tensors :param input_shape: input shapes :type input_shape: sequence of tuple

call(inputs, mask=None)[source]

Main logic :param inputs: input tensors :type inputs: tuple of tensor :param mask: mask tensor :type mask: tensor

Returns: output tensor

compute_output_shape(input_shape)[source]

Compute output shapes from input shapes :param input_shape: input shapes :type input_shape: sequence of tuple

Returns: sequence of tuples output shapes

get_config()[source]

Part of keras layer interface, where the signature is converted into a dict

Returns

configurational dictionary