use the idea from
http://davidstutz.de/implementing-tensorflow-operations-in-c-including-gradients/
