Imported from https://github.com/hmishra2250/NTM-One-Shot-TF