def get_layer(self, cols, rows): """Return a layer.""" return AnalogLinear( cols, rows, bias=True, resistive_device=ConstantStepResistiveDevice()).cuda()
def get_layer(self, cols, rows): """Return a layer.""" return AnalogLinear( cols, rows, bias=True, resistive_device=FloatingPointResistiveDevice()).cuda()
def get_layer(self, cols=3, rows=4, **kwargs): """Return a layer.""" # pylint: disable=arguments-differ return AnalogLinear(cols, rows, resistive_device=ConstantStepResistiveDevice( ConstantStepResistiveDeviceParameters( w_max_dtod=0, w_min_dtod=0)), **kwargs).cuda()
def get_model(self, **kwargs): """Return a layer.""" if 'resistive_device' not in kwargs: kwargs['resistive_device'] = ConstantStepResistiveDevice() return AnalogLinear(in_features=5, out_features=3, **kwargs).cuda()
def get_model(self, **kwargs): """Return a layer.""" if 'resistive_device' not in kwargs: kwargs['resistive_device'] = FloatingPointResistiveDevice() return AnalogLinear(in_features=5, out_features=3, **kwargs)