Add support for internal memory on v-1.1.0 (v1-train) branch