moved shape_dim
refactor RefactorSubtensors
ordereddict