megengine.Tensor.flatten

Tensor.flatten(start_axis=0, end_axis=- 1)

参考 flatten.