class TTv2IdealizedPreset(UnitCellRPUConfig): """Configuration using TTv2 with :class:`~aihwkit.simulator.presets.devices.IdealizedPresetDevice`. See :class:`~aihwkit.simulator.configs.devices.BufferedTransferCompound` for details on TTv2-like optimizers. The default peripheral hardware (:class:`~aihwkit.simulator.presets.utils.PresetIOParameters`) and analog update (:class:`~aihwkit.simulator.presets.utils.PresetUpdateParameters`) configuration is used otherwise. """ device: UnitCell = field( default_factory=lambda: BufferedTransferCompound( unit_cell_devices=[IdealizedPresetDevice(), IdealizedPresetDevice()], transfer_forward=PresetIOParameters(), transfer_update=PresetUpdateParameters(), transfer_every=1.0, units_in_mbatch=True, )) forward: IOParameters = field(default_factory=PresetIOParameters) backward: IOParameters = field(default_factory=PresetIOParameters) update: UpdateParameters = field(default_factory=PresetUpdateParameters)
class PCMPresetUnitCell(OneSidedUnitCell): """A unit cell that is comprised of two uni-directional PCM devices of opposite sign (see :class:`~PCMPresetDevice`). Check for refresh is performed after each mini-batch update. See :class:`~aihwkit.simulator.configs.device.OneSidedUnitCell` for details on the refresh implementation. """ unit_cell_devices: List = field( default_factory=lambda: [PCMPresetDevice(), PCMPresetDevice()]) refresh_every: int = 1 units_in_mbatch: bool = True refresh_forward: IOParameters = field(default_factory=PresetIOParameters) refresh_update: UpdateParameters = field( default_factory=lambda: PresetUpdateParameters(desired_bl=31))