Ports of our pedagogic example layers from Python to Java