Print function in ex3_nn.