(self, dev=cpu_dev)
| 95 | |
| 96 | @on_cpu_gpu |
| 97 | def test_sgd_const_lr(self, dev=cpu_dev): |
| 98 | cpu_dev.EnableGraph(False) |
| 99 | sgd1 = opt.SGD(lr=0.1) |
| 100 | w_shape=(2,3) |
| 101 | w = tensor.Tensor(w_shape, device=dev).set_value(0.1) |
| 102 | g = tensor.Tensor(w_shape, device=dev).set_value(0.1) |
| 103 | |
| 104 | w_step1 = w-0.1*g |
| 105 | sgd1.apply(w.name, w, g) |
| 106 | |
| 107 | assertTensorEqual(w, w_step1) |
| 108 | |
| 109 | @on_cpu_gpu |
| 110 | def test_RMSProp_const_lr(self, dev=cpu_dev): |
nothing calls this directly
no test coverage detected