train.appendLayer(layer1).appendLayer(layer2)

layer1.appendOn(csvSource)
layer2.appendOn(layer1)
layer3.attachOn(layer1, layer2)

def printAvgLoss(e):
if (e.localStep % 200):
print("Average Loss: ", e.avgLoss)

train.addEventListener("stepend", printAvgLoss)
train.fit()

Timestamp,Run,Cross Validation Step,Global Step,Local Step,Total Loss,Average Loss,Learning Rate,Examples per Second,Seconds per Step 2018-11-30 00:57:28.294434,0,-1,100,100,4928.1377,616.0172,0.001,3573.4335228801588,0.05541443564356436 2018-11-30 00:57:29.261235,0,-1,200,200,3840.8416,480.1052,0.001,20686.780423272216,0.00966801 2018-11-30 00:57:30.218490,0,-1,300,300,2736.2058,342.02573,0.001,20893.074468140672,0.009572549999999999 2018-11-30 00:57:31.126033,0,-1,400,400,1881.9495,235.24368,0.001,22037.52329090743,0.00907543 2018-11-30 00:57:32.048034,0,-1,500,500,1848.6156,231.07695,0.001,21691.95044257002,0.009220009999999999