Custom Dtype Objects in Tensors


The ability to create tf.Tensors that hold custom objects.


I am currently working on deep learning models using data encrypted with homomorphic encryption. This data is stored in a custom Python class with operator overloading. Right now, this functionality works with neural networks developed from scratch using NumPy, but having access to TensorFlow’s suite of deep learning capabilities would make this work much more robust and scalable to various network architectures.


NumPy’s ndarray is able to hold custom Python objects and call overloaded NumPy functions, allowing us to work with the encrypted data in various ways. Something similar with TensorFlow’s robust deep learning capabilities would be very useful.

As I know I don’t think is possibile now. Is your the same case as?

I think you could find a short analisys in this ttf-encrypted TF big tensor library ticket:

Also, more in general, have you tried to see what was their approach in: