Refactored __init__ of the AutoEncoder base class to accept a kwargs dict.