Home
last modified time | relevance | path

Searched refs:var_device (Results 1 – 9 of 9) sorted by relevance

/external/tensorflow/tensorflow/python/keras/optimizer_v2/
Dgradient_descent.py103 def _prepare_local(self, var_device, var_dtype, apply_state): argument
104 super(SGD, self)._prepare_local(var_device, var_dtype, apply_state)
105 apply_state[(var_device, var_dtype)]["momentum"] = array_ops.identity(
109 var_device, var_dtype = var.device, var.dtype.base_dtype
110 coefficients = ((apply_state or {}).get((var_device, var_dtype))
111 or self._fallback_apply_state(var_device, var_dtype))
133 var_device, var_dtype = var.device, var.dtype.base_dtype
134 coefficients = (kwargs.get("apply_state", {}).get((var_device, var_dtype))
135 or self._fallback_apply_state(var_device, var_dtype))
142 var_device, var_dtype = var.device, var.dtype.base_dtype
[all …]
Dadagrad.py107 def _prepare_local(self, var_device, var_dtype, apply_state): argument
108 super(Adagrad, self)._prepare_local(var_device, var_dtype, apply_state)
109 apply_state[(var_device, var_dtype)].update(dict(
111 neg_lr_t=-apply_state[(var_device, var_dtype)]['lr_t'],
148 var_device, var_dtype = var.device, var.dtype.base_dtype
149 coefficients = ((apply_state or {}).get((var_device, var_dtype))
150 or self._fallback_apply_state(var_device, var_dtype))
162 var_device, var_dtype = var.device, var.dtype.base_dtype
163 coefficients = ((apply_state or {}).get((var_device, var_dtype))
164 or self._fallback_apply_state(var_device, var_dtype))
Dadadelta.py111 def _prepare_local(self, var_device, var_dtype, apply_state): argument
112 super(Adadelta, self)._prepare_local(var_device, var_dtype, apply_state)
113 apply_state[(var_device, var_dtype)].update(dict(
128 var_device, var_dtype = var.device, var.dtype.base_dtype
129 coefficients = ((apply_state or {}).get((var_device, var_dtype))
130 or self._fallback_apply_state(var_device, var_dtype))
145 var_device, var_dtype = var.device, var.dtype.base_dtype
146 coefficients = ((apply_state or {}).get((var_device, var_dtype))
147 or self._fallback_apply_state(var_device, var_dtype))
Dadamax.py115 def _prepare_local(self, var_device, var_dtype, apply_state): argument
116 super(Adamax, self)._prepare_local(var_device, var_dtype, apply_state)
122 lr_t = apply_state[(var_device, var_dtype)]['lr_t']
124 apply_state[(var_device, var_dtype)].update(dict(
135 var_device, var_dtype = var.device, var.dtype.base_dtype
136 coefficients = ((apply_state or {}).get((var_device, var_dtype))
137 or self._fallback_apply_state(var_device, var_dtype))
155 var_device, var_dtype = var.device, var.dtype.base_dtype
156 coefficients = ((apply_state or {}).get((var_device, var_dtype))
157 or self._fallback_apply_state(var_device, var_dtype))
Dftrl.py148 def _prepare_local(self, var_device, var_dtype, apply_state): argument
149 super(Ftrl, self)._prepare_local(var_device, var_dtype, apply_state)
150 apply_state[(var_device, var_dtype)].update(dict(
162 var_device, var_dtype = var.device, var.dtype.base_dtype
163 coefficients = ((apply_state or {}).get((var_device, var_dtype))
164 or self._fallback_apply_state(var_device, var_dtype))
194 var_device, var_dtype = var.device, var.dtype.base_dtype
195 coefficients = ((apply_state or {}).get((var_device, var_dtype))
196 or self._fallback_apply_state(var_device, var_dtype))
Dadam.py161 def _prepare_local(self, var_device, var_dtype, apply_state): argument
162 super(Adam, self)._prepare_local(var_device, var_dtype, apply_state)
169 lr = (apply_state[(var_device, var_dtype)]['lr_t'] *
171 apply_state[(var_device, var_dtype)].update(dict(
193 var_device, var_dtype = var.device, var.dtype.base_dtype
194 coefficients = ((apply_state or {}).get((var_device, var_dtype))
195 or self._fallback_apply_state(var_device, var_dtype))
230 var_device, var_dtype = var.device, var.dtype.base_dtype
231 coefficients = ((apply_state or {}).get((var_device, var_dtype))
232 or self._fallback_apply_state(var_device, var_dtype))
Drmsprop.py132 def _prepare_local(self, var_device, var_dtype, apply_state): argument
133 super(RMSprop, self)._prepare_local(var_device, var_dtype, apply_state)
136 apply_state[(var_device, var_dtype)].update(dict(
137 neg_lr_t=-apply_state[(var_device, var_dtype)]["lr_t"],
145 var_device, var_dtype = var.device, var.dtype.base_dtype
146 coefficients = ((apply_state or {}).get((var_device, var_dtype))
147 or self._fallback_apply_state(var_device, var_dtype))
191 var_device, var_dtype = var.device, var.dtype.base_dtype
192 coefficients = ((apply_state or {}).get((var_device, var_dtype))
193 or self._fallback_apply_state(var_device, var_dtype))
Dnadam.py124 def _prepare_local(self, var_device, var_dtype, apply_state): argument
144 apply_state[(var_device, var_dtype)] = dict(
167 var_device, var_dtype = var.device, var.dtype.base_dtype
168 coefficients = ((apply_state or {}).get((var_device, var_dtype))
169 or self._fallback_apply_state(var_device, var_dtype))
190 var_device, var_dtype = var.device, var.dtype.base_dtype
191 coefficients = ((apply_state or {}).get((var_device, var_dtype))
192 or self._fallback_apply_state(var_device, var_dtype))
Doptimizer_v2.py618 for var_device in var_devices:
619 keys.add((var_device, var_dtype))
622 for var_device, var_dtype in keys:
623 apply_state[(var_device, var_dtype)] = {}
624 with ops.device(var_device):
625 self._prepare_local(var_device, var_dtype, apply_state)
629 def _prepare_local(self, var_device, var_dtype, apply_state): argument
632 apply_state[(var_device, var_dtype)]["lr_t"] = lr_t
634 def _fallback_apply_state(self, var_device, var_dtype): argument
636 apply_state = {(var_device, var_dtype): {}}
[all …]