/external/tensorflow/tensorflow/python/ops/ |
D | template.py | 329 trainable_variables = ops.get_collection_ref( 334 if trainable_at_start != len(trainable_variables): 338 (trainable_variables[trainable_at_start:],)) 427 def trainable_variables(self): member in Template 440 trainable_variables = set(self.trainable_variables) 441 return [x for x in global_variables if x not in trainable_variables] 469 return self.trainable_variables 530 def trainable_variables(self): member in _EagerTemplateVariableStore 532 self._eager_variable_store.trainable_variables()) 601 trainable_at_start = self._template_store.trainable_variables() [all …]
|
/external/tensorflow/tensorflow/python/eager/benchmarks/resnet50/ |
D | hvp_test.py | 35 model.trainable_variables, vector) as acc: 40 grads = grad_tape.gradient(loss, model.trainable_variables) 46 grad_tape.watch(model.trainable_variables) 48 model.trainable_variables, vector) as acc: 52 return grad_tape.gradient(acc.jvp(loss), model.trainable_variables) 60 variables = model.trainable_variables 73 grads = inner_tape.gradient(loss, model.trainable_variables) 75 grads, model.trainable_variables, output_gradients=vector) 96 vector = [tf.ones_like(v) for v in model.trainable_variables] 103 for hvp_component, variable in zip(hvp, model.trainable_variables): [all …]
|
/external/tensorflow/tensorflow/python/keras/layers/ |
D | multi_head_attention_test.py | 128 self.assertLen(test_layer._query_dense.trainable_variables, 2) 129 self.assertLen(test_layer._output_dense.trainable_variables, 2) 131 self.assertLen(test_layer._query_dense.trainable_variables, 1) 132 self.assertLen(test_layer._output_dense.trainable_variables, 1) 305 len(model.trainable_variables), len(reloaded_model.trainable_variables)) 306 for src_v, loaded_v in zip(model.trainable_variables, 307 reloaded_model.trainable_variables): 325 len(model.trainable_variables), len(reloaded_model.trainable_variables)) 326 for src_v, loaded_v in zip(model.trainable_variables, 327 reloaded_model.trainable_variables):
|
/external/tensorflow/tensorflow/python/keras/tests/ |
D | saved_model_test.py | 51 trainable_variables = self.dense.trainable_variables 52 gradients = tape.gradient(loss, trainable_variables) 53 self.optimizer.apply_gradients(zip(gradients, trainable_variables))
|
D | tracking_util_test.py | 118 variables = model.trainable_variables 126 variables = other_model.trainable_variables 208 variables = model.trainable_variables 285 variables = model.trainable_variables 307 variables = model.trainable_variables 344 variables = model.trainable_variables 624 variables = model.trainable_variables 655 variables = model.trainable_variables 683 variables = model.trainable_variables 775 variables = model.trainable_variables [all …]
|
/external/tensorflow/tensorflow/python/keras/premade/ |
D | wide_deep.py | 123 linear_vars = self.linear_model.trainable_variables 124 dnn_vars = self.dnn_model.trainable_variables 132 trainable_variables = self.trainable_variables 133 grads = tape.gradient(loss, trainable_variables) 134 self.optimizer.apply_gradients(zip(grads, trainable_variables))
|
/external/tensorflow/tensorflow/python/keras/legacy_tf_layers/ |
D | convolutional_test.py | 269 self.assertEqual(len(variables.trainable_variables()), 2) 271 self.assertEqual(len(variables.trainable_variables()), 2) 279 self.assertEqual(len(variables.trainable_variables()), 2) 282 self.assertEqual(len(variables.trainable_variables()), 2) 291 weights = variables.trainable_variables() 307 self.assertEqual(len(variables.trainable_variables()), 2) 309 self.assertEqual(len(variables.trainable_variables()), 4) 442 self.assertEqual(len(variables.trainable_variables()), 3) 444 self.assertEqual(len(variables.trainable_variables()), 3) 452 self.assertEqual(len(variables.trainable_variables()), 3) [all …]
|
/external/tensorflow/tensorflow/python/keras/integration_test/ |
D | forwardprop_test.py | 169 for v in layer.trainable_variables: 216 [input_value] + layer.trainable_variables) 219 [input_value] + layer.trainable_variables) 254 vector = tape.gradient(loss, model.trainable_variables) 257 [model.trainable_variables], [vector]) 259 tape.watch(model.trainable_variables) 261 first_grads = tape.gradient(loss, model.trainable_variables) 263 first_grads, model.trainable_variables, output_gradients=vector)
|
D | function_test.py | 59 trainable_variables = self.trainable_variables 60 gradients = tape.gradient(loss, trainable_variables) 61 self.optimizer.apply_gradients(zip(gradients, trainable_variables)) 175 layer_variables = layer.trainable_variables 198 layer_variables = layer.trainable_variables
|
D | gradient_checkpoint_test.py | 102 tr_vars = model.trainable_variables 128 model1.trainable_variables + model2.trainable_variables + 129 model3.trainable_variables)
|
D | saved_model_test.py | 56 trainable_variables = self.dense.trainable_variables 57 gradients = tape.gradient(loss, trainable_variables) 58 self.optimizer.apply_gradients(zip(gradients, trainable_variables)) 141 train_vars = self.layer.trainable_variables
|
/external/tensorflow/tensorflow/compiler/tests/ |
D | adadelta_test.py | 80 self.assertNotIn(slot[0], variables.trainable_variables()) 84 self.assertNotIn(slot_update[0], variables.trainable_variables()) 88 self.assertNotIn(slot[1], variables.trainable_variables()) 92 self.assertNotIn(slot_update[1], variables.trainable_variables())
|
D | momentum_test.py | 58 self.assertFalse(slot0 in variables.trainable_variables()) 61 self.assertFalse(slot1 in variables.trainable_variables()) 144 self.assertFalse(slot0 in variables.trainable_variables()) 147 self.assertFalse(slot1 in variables.trainable_variables())
|
/external/tensorflow/tensorflow/python/kernel_tests/ |
D | template_test.py | 350 self.assertEqual(1, len(nested1.trainable_variables)) 351 self.assertEqual(1, len(nested2.trainable_variables)) 352 self.assertIs(nested1.trainable_variables[0], v1) 353 self.assertIs(nested2.trainable_variables[0], v2) 371 for v, w in zip(tmpl1.trainable_variables, [v1, v2]): 380 for v, w in zip(tmpl2.trainable_variables, [v5, v6]): 422 self.assertIs(nested1.trainable_variables[0], v1[0]) 423 self.assertIs(nested2.trainable_variables[0], v2[0]) 655 self.assertEqual([], list(ta.trainable_variables)) 656 self.assertEqual([], list(tb.trainable_variables)) [all …]
|
D | rnn_test.py | 376 trainable_variables = ops_lib.get_collection( 379 trainable_variables) 395 trainable_variables = ops_lib.get_collection( 398 trainable_variables) 509 trainable_variables = ops_lib.get_collection( 512 trainable_variables) 577 trainable_variables = ops_lib.get_collection( 580 trainable_variables) 643 trainable_variables = ops_lib.get_collection( 646 trainable_variables)
|
/external/tensorflow/tensorflow/python/training/ |
D | adadelta_test.py | 90 self.assertFalse(slot[0] in variables.trainable_variables()) 94 self.assertFalse(slot_update[0] in variables.trainable_variables()) 98 self.assertFalse(slot[1] in variables.trainable_variables()) 102 self.assertFalse(slot_update[1] in variables.trainable_variables())
|
/external/tensorflow/tensorflow/python/ops/parallel_for/ |
D | gradients_test.py | 147 weights = variables.trainable_variables() 174 return gradient_ops.gradients(activation, variables.trainable_variables()) 180 loop_fn_dtypes = [x.dtype for x in variables.trainable_variables()] 198 return gradient_ops.gradients(output, variables.trainable_variables()) 209 loop_fn_dtypes = [x.dtype for x in variables.trainable_variables()] 294 return gradient_ops.gradients(loss, variables.trainable_variables()) 298 loop_fn, [dtypes.float32] * len(variables.trainable_variables()), 321 logits, variables.trainable_variables(), use_pfor=use_pfor) 328 [dtypes.float32] * len(variables.trainable_variables()), batch_size) 337 jacobians = gradients.jacobian(output, variables.trainable_variables()) [all …]
|
/external/tensorflow/tensorflow/python/keras/distribute/ |
D | test_example.py | 50 return optimizer.minimize(loss_fn, lambda: layer.trainable_variables) 93 return optimizer.minimize(loss_fn, lambda: layer.trainable_variables)
|
D | ctl_correctness_test.py | 122 grads = tape.gradient(loss, model.trainable_variables) 123 optimizer.apply_gradients(zip(grads, model.trainable_variables)) 183 grads = tape.gradient(loss, model.trainable_variables) 184 optimizer.apply_gradients(zip(grads, model.trainable_variables))
|
D | sharded_variable_test.py | 58 self.assertAllEqual(layer.trainable_weights, layer.trainable_variables) 102 self.assertAllEqual(layer.trainable_weights, layer.trainable_variables)
|
D | mirrored_strategy_test.py | 119 grads = tape.gradient(loss, model.trainable_variables) 120 optimizer.apply_gradients(list(zip(grads, model.trainable_variables)))
|
/external/tensorflow/tensorflow/python/training/tracking/ |
D | data_structures.py | 222 trainable_variables = [] 225 trainable_variables += obj.trainable_variables 229 return trainable_variables + trainable_extra_variables 246 trainable_variables = [] 249 trainable_variables += obj.trainable_variables 252 trainable_variables + trainable_extra_variables + 265 def trainable_variables(self): member in TrackableDataStructure
|
/external/tensorflow/tensorflow/python/distribute/ |
D | single_loss_example.py | 73 return optimizer.minimize(loss_fn, lambda: layer.trainable_variables) 116 return optimizer.minimize(loss_fn, lambda: layer.trainable_variables)
|
/external/tensorflow/tensorflow/python/module/ |
D | module_test.py | 239 self.assertEqual(m.trainable_variables, 241 self.assertEqual(m.child.trainable_variables, 243 self.assertEqual(m.child.child.trainable_variables, (m.child.child.w,)) 247 self.assertEqual(len(m.trainable_variables), 0) 248 self.assertEqual(len(m.child.trainable_variables), 0) 249 self.assertEqual(len(m.child.child.trainable_variables), 0)
|
/external/tensorflow/tensorflow/compiler/mlir/tfr/examples/mnist/ |
D | mnist_train.py | 152 grads = tape.gradient(loss_value, model.trainable_variables) 155 optimizer.apply_gradients(zip(grads, model.trainable_variables))
|