my tf version is 0.12, and i failed to apply your code. could you tell me how to use this function in my tf version? thx.