func createDBN() rbm.DBN { res := make(rbm.DBN, len(LayerSizes)-1) for i := 1; i < len(LayerSizes); i++ { res[i-1] = rbm.NewRBM(LayerSizes[i-1], LayerSizes[i]) } return res }
func buildLayers() rbm.DBN { res := make(rbm.DBN, len(HiddenSizes)) for i, size := range HiddenSizes { inputSize := ImageSize if i > 0 { inputSize = HiddenSizes[i-1] } res[i] = rbm.NewRBM(inputSize, size) } return res }