Created by: zhiqiu
As the title.
In some scenarios, we need the ability to covert tensor to VarBase in imperative mode.
t = fluid.Tensor()
t.set(np.ndarray([5, 30]), fluid.CUDAPlace(0))
var = fluid.dygraph.to_variable(t)
np.array_equal(t, var.numpy())