Example #1
0
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
}
Example #2
0
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
}