Searched refs:scaling_sens (Results 1 – 10 of 10) sorted by relevance
/third_party/mindspore/mindspore/nn/wrap/ |
D | loss_scale.py | 318 scaling_sens = self.scale_sense 320 status, scaling_sens = self.start_overflow_check(loss, scaling_sens) 322 scaling_sens_filled = C.ones_like(loss) * F.cast(scaling_sens, F.dtype(loss)) 324 grads = self.hyper_map(F.partial(_grad_scale, scaling_sens), grads) 334 return loss, cond, scaling_sens 501 scaling_sens = self.scale_sense 504 scaling_sens_filled = C.ones_like(loss) * F.cast(scaling_sens, F.dtype(loss)) 513 …grads = self.hyper_map(F.partial(shard_grad_scale, scaling_sens * self.degree), grads, self.accu_g… 516 … grads = self.hyper_map(F.partial(grad_scale, scaling_sens * self.degree), grads, accu_grads) 525 ret = (loss, overflow, scaling_sens)
|
/third_party/mindspore/tests/ut/python/parallel/ |
D | test_loss_scale.py | 88 scaling_sens = self.loss_scale 90 scaling_sens = sens 95 scaling_sens = F.depend(scaling_sens, clear_status) 96 grads = self.grad(self.network, weights)(x, self.cast(scaling_sens, mstype.float32)) 110 return (loss, cond, scaling_sens)
|
D | test_dataset_util.py | 33 full_tensor = _to_full_tensor(elem, device_num, global_rank, scaling_sens=None) 47 full_tensor = _to_full_tensor(elem, device_num, global_rank, scaling_sens=None) 65 full_tensor = _to_full_tensor(elem, device_num, global_rank, scaling_sens=0.1)
|
/third_party/mindspore/mindspore/train/ |
D | _utils.py | 147 def _to_tensor(elem, scaling_sens=None): argument 154 if scaling_sens: 155 elem_tuple = tuple(elem) + (Tensor(scaling_sens, mstype.float32),) 160 if scaling_sens: 161 lst.append(Tensor(scaling_sens, mstype.float32))
|
D | model.py | 327 scaling_sens = 1 329 scaling_sens = self._loss_scale_manager.get_loss_scale() 331 scaling_sens /= self._device_number 332 return scaling_sens
|
/third_party/mindspore/tests/st/networks/models/bert/src/ |
D | bert_for_pre_training.py | 400 scaling_sens = self.loss_scale 402 scaling_sens = sens 407 scaling_sens = F.depend(scaling_sens, clear_status) 415 self.cast(scaling_sens, 419 grads = self.hyper_map(F.partial(grad_scale, scaling_sens * self.degree), grads) 436 return (loss, cond, scaling_sens)
|
/third_party/mindspore/mindspore/boost/ |
D | boost_cell_wrapper.py | 374 scaling_sens = self.scale_sense 376 status, scaling_sens = self._start_overflow_check(loss, scaling_sens) 378 scaling_sens_filled = C.ones_like(loss) * F.cast(scaling_sens, F.dtype(loss)) 380 grads = self.hyper_map(F.partial(_grad_scale, scaling_sens), grads) 394 return loss, cond, scaling_sens
|
/third_party/mindspore/tests/perf_test/bert/ |
D | test_bert_train.py | 162 scaling_sens = Tensor(np.ones([1]).astype(np.float32)) 163 inputs = load_test_data(batch_size) + (scaling_sens,) 217 scaling_sens = Tensor(np.ones([1]).astype(np.float32)) 218 inputs = load_test_data(batch_size) + (scaling_sens,)
|
/third_party/mindspore/tests/st/networks/models/resnet50/src_thor/ |
D | model_thor.py | 261 scaling_sens = 1 263 scaling_sens = self._loss_scale_manager.get_loss_scale() 265 scaling_sens /= self._device_number 266 return scaling_sens 514 scaling_sens = self._get_scaling_sens() 515 next_element = tuple(next_element) + (Tensor(scaling_sens, mstype.float32),)
|
/third_party/mindspore/mindspore/parallel/ |
D | _utils.py | 114 def _to_full_tensor(elem, global_device_num, global_rank, scaling_sens=None): argument 167 if scaling_sens: 168 lst.append(Tensor(scaling_sens, mstype.float32))
|