convert type of shape to int
add dumper to trainer, use deque to save state

add a layer output dumper to trainer in order to save the output before
last fc layer

use collections.deque to save the attributes of trainer when training
with replaynet
add a function to get output with index
change the expr to keep consistent with trainer
Merge with Russell's change

add dumper for trainer
use deque to save and restore attributes of trainer
convet GPUArray's shape to int