Solved by Dwight_Foster in post #2 
              
              
                It is because in this line: 
            hidden = (h1,h2)

you combine the two hidden layers into a tuple. Because of this you cannot use .data. For a GRU you only need one hidden layer not two. So you can either use h1 or h2. You only need two for lstms because it also requires the cell state.