Update generate-tensor.cpp

now it works ;)