Creating a tensor mask based of rate/percentage/ratio

It works like a charm. Thank you very much.