hashtron.layer.majpool2d package

Submodules

hashtron.layer.majpool2d.combiner module

class hashtron.layer.majpool2d.combiner.MajPool2D(vec, width, height, subwidth, subheight, capwidth, capheight, repeat, bias)[source]

Bases: object

disregard(n: int) bool[source]

Check if setting the n-th boolean value to False would not affect any feature output.

Parameters:

n – The index of the boolean value to check.

Returns:

True if setting the value to False would not affect the output, False otherwise.

feature(m: int) int[source]

Compute the m-th feature from the combiner.

Parameters:

m – The index of the feature to compute.

Returns:

The computed feature as an integer.

put(n: int, v: bool) None[source]

Set the n-th boolean value in the vector.

Parameters:
  • n – The index of the boolean value to set.

  • v – The boolean value to set.

hashtron.layer.majpool2d.layer module

class hashtron.layer.majpool2d.layer.MajPool2DLayer(width, height, subwidth, subheight, capwidth, capheight, repeat, bias=0)[source]

Bases: Layer

lay() MajPool2D[source]

hashtron.layer.majpool2d.test_combiner module

class hashtron.layer.majpool2d.test_combiner.TestMajPool2D(methodName='runTest')[source]

Bases: TestCase

test_disregard()[source]
test_feature()[source]
test_put()[source]

Module contents