Update generate-tensor.cpp