1. A memory device, comprising: a substrate layer; and a two-terminal memory layer comprising an active metal layer, a resistive switching material (RSLM) layer, a resistive layer, and an ohmic contact layer; wherein the resistive layer comprises a first semiconductor material in a polycrystalline phase situated on top of a second semiconductor material in an amorphous phase.