pytorch x.view(x.size(0), -1)

NoSuchKey