Adder Bricks

class fugu.bricks.adder_bricks.streaming_adder(name=None)

Bases: Brick

streaming adder function. Brad Aimone jbaimon@sandia.gov

build(graph, dimensionality, control_nodes, input_lists, input_codings)

Build streaming adder brick.

Parameters:
  • graph – networkx graph to define connections of the computational graph

  • dimensionality (dict) – dictionary to define the shapes and parameters of the brick

  • control_nodes (dict) – dictionary of lists of auxillary networkx nodes. Excpected keys: ‘complete’ - A list of neurons that fire when the brick is done

  • input_lists (list) – list of nodes that will contain input

  • input_coding (list) – list of input coding formats

Returns:

graph of a computational elements and connections self.dimensionality: dictionary of output parameters (shape, coding, layers, depth, etc) complete: dictionary of control nodes (‘complete’) output_list: list of output output_codings: list of coding formats of output

Return type:

graph

class fugu.bricks.adder_bricks.temporal_shift(name=None, shift_length=1)

Bases: Brick

temporal shift function. Brad Aimone jbaimon@sandia.gov

build(graph, dimensionality, control_nodes, input_lists, input_codings)

Build bit shift brick.

Parameters:
  • graph – networkx graph to define connections of the computational graph

  • dimensionality (dict) – dictionary to define the shapes and parameters of the brick

  • control_nodes (dict) – dictionary of lists of auxillary networkx nodes. Excpected keys: ‘complete’ - A list of neurons that fire when the brick is done

  • input_lists (dict) – list of nodes that will contain input

  • input_coding (dict) – list of input coding formats

Returns:

graph of a computational elements and connections self.dimensionality: dictionary of output parameters (shape, coding, layers, depth, etc) dictionary of control nodes (‘complete’) output_lists: list of output output_codings: list of coding formats of output

Return type:

graph

class fugu.bricks.adder_bricks.streaming_scalar_multiplier(name=None, shift_length=1)

Bases: Brick

streaming scalar multiplier function. Brad Aimone jbaimon@sandia.gov

build(graph, dimensionality, control_nodes, input_lists, input_codings, alpha=0.125)

Deprecated method for building the computational graph of the brick. New brick subclasses should override build2() instead.

Parameters:
  • graph (graph) – networkx graph

  • metadata (dictionary) – A dictionary of shapes and properties

  • control_nodes (list) –

    list of dictionary of auxillary nodes. Acceptable keys include:

    ’complete’ - A list of neurons that fire when the brick is done ‘begin’ - A list of neurons that fire when the brick begins computation

    (used for temporal processing)

  • input_lists (list) – list of lists of nodes for input neurons

  • input_codings (list) – list of input coding types (as strings)

class fugu.bricks.adder_bricks.streaming_adder(name=None)

Bases: Brick

streaming adder function. Brad Aimone jbaimon@sandia.gov

build(graph, dimensionality, control_nodes, input_lists, input_codings)

Build streaming adder brick.

Parameters:
  • graph – networkx graph to define connections of the computational graph

  • dimensionality (dict) – dictionary to define the shapes and parameters of the brick

  • control_nodes (dict) – dictionary of lists of auxillary networkx nodes. Excpected keys: ‘complete’ - A list of neurons that fire when the brick is done

  • input_lists (list) – list of nodes that will contain input

  • input_coding (list) – list of input coding formats

Returns:

graph of a computational elements and connections self.dimensionality: dictionary of output parameters (shape, coding, layers, depth, etc) complete: dictionary of control nodes (‘complete’) output_list: list of output output_codings: list of coding formats of output

Return type:

graph

class fugu.bricks.adder_bricks.temporal_shift(name=None, shift_length=1)

Bases: Brick

temporal shift function. Brad Aimone jbaimon@sandia.gov

build(graph, dimensionality, control_nodes, input_lists, input_codings)

Build bit shift brick.

Parameters:
  • graph – networkx graph to define connections of the computational graph

  • dimensionality (dict) – dictionary to define the shapes and parameters of the brick

  • control_nodes (dict) – dictionary of lists of auxillary networkx nodes. Excpected keys: ‘complete’ - A list of neurons that fire when the brick is done

  • input_lists (dict) – list of nodes that will contain input

  • input_coding (dict) – list of input coding formats

Returns:

graph of a computational elements and connections self.dimensionality: dictionary of output parameters (shape, coding, layers, depth, etc) dictionary of control nodes (‘complete’) output_lists: list of output output_codings: list of coding formats of output

Return type:

graph

class fugu.bricks.adder_bricks.streaming_scalar_multiplier(name=None, shift_length=1)

Bases: Brick

streaming scalar multiplier function. Brad Aimone jbaimon@sandia.gov

build(graph, dimensionality, control_nodes, input_lists, input_codings, alpha=0.125)

Deprecated method for building the computational graph of the brick. New brick subclasses should override build2() instead.

Parameters:
  • graph (graph) – networkx graph

  • metadata (dictionary) – A dictionary of shapes and properties

  • control_nodes (list) –

    list of dictionary of auxillary nodes. Acceptable keys include:

    ’complete’ - A list of neurons that fire when the brick is done ‘begin’ - A list of neurons that fire when the brick begins computation

    (used for temporal processing)

  • input_lists (list) – list of lists of nodes for input neurons

  • input_codings (list) – list of input coding types (as strings)