Source code for neuroptica.initializers

'''[Incomplete module] The initializers submodule includes methods for initializing parameters (such as phase shifter
values) throughout a NetworkLayer.'''

from neuroptica import NetworkLayer


[docs]class Initializer: '''Base initializer class'''
[docs] def initialize_mesh(self, layer: NetworkLayer): ''' Initialize the phase shifter values for an optical mesh :param layer: the NetworkLayer to initialize ''' raise NotImplementedError("initialize_mesh() must be overridden in child class!")
[docs]class RandomPhaseInitializer(Initializer):
[docs] def initialize_mesh(self, layer: NetworkLayer): pass