optimizer_test.go 378 字节
Newer Older
H
Helin Wang 已提交
1 2
package pserver

D
dongzhihong 已提交
3 4 5 6
import (
	"io/ioutil"
	"testing"
)
H
Helin Wang 已提交
7

D
dongzhihong 已提交
8 9 10 11
func TestOptimizerCreateRelease(t *testing.T) {
	p := Parameter{
		Name:        "a",
		ElementType: Float32,
D
dzhwinter 已提交
12
	}
D
dongzhihong 已提交
13 14 15 16 17 18 19 20
	p.Content = []byte{0.1, 0.3}
	config, err := ioutil.ReadFile("./cclient/test/testdata/optimizer.pb.txt")

	param := ParameterWithConfig{
		Param:  p,
		Config: config,
	}
	o := newOptimizer(param)
H
Helin Wang 已提交
21 22
	o.Cleanup()
}