FYI: For when you create your own custom layers (quite low level stuff!) there is a slightly new way to do it which prevents memory leaks and such like:
Old way (if A is an intermediate calculation):
var A = backend.Mul(B,C);
New way:
using A = backend.NewTempTensorFloat(new TensorShape(5,6));
backend.Mul(B,C,A);
This means the the temporary tensor get’s cleared up from memory and not hanging around. (Then you use backend.NewOutputTensorFloat
for the actual output.)
When you do normal tensor operations it’s the same as before.
Hope this helps people!