you shouldn’t use two activation functions (here ReLU ad Tanh) , also if is a classifier you may use Sigmoid in final layer instead of tanh. And Variable is deprecated, pass the tensor directly instead