func TensorDivNorm32(tsr *etensor.Float32, ndim int, nfunc Func32) {
	if ndim == 0 {
		DivNorm32(tsr.Values, nfunc)
	}
	if ndim >= tsr.NumDims() {
		panic("norm.TensorSubNorm32: number of dims must be < NumDims()")
	}
	sln := 1
	ln := tsr.Len()
	for i := 0; i < ndim; i++ {
		sln *= tsr.Dim(i)
	}
	dln := ln / sln
	for sl := 0; sl < sln; sl++ {
		st := sl * dln
		vl := tsr.Values[st : st+dln]
		DivNorm32(vl, nfunc)
	}
}
/////////////////////////////////////////
DivNorm
TensorDivNorm32 does divisive normalization by given norm function
computed on the first ndim dims of the tensor, where 0 = all values,
1 = norm each of the sub-dimensions under the first outer-most dimension etc.
ndim must be < NumDims() if not 0.
package norm
import (
	"github.com/emer/etable/etensor"
)