TensorFlow mask definition