In case anyone faces the same problem, what happened was that I appended the F.relu operation directly in the graph to the nn.Linear.  I believe this caused a problem when I tried to use the layer in the forward method.