Home
last modified time | relevance | path

Searched refs:trainable_variables (Results 1 – 25 of 451) sorted by relevance

12345678910>>...19

/external/tensorflow/tensorflow/python/ops/
Dtemplate.py317 trainable_variables = ops.get_collection_ref(
322 if trainable_at_start != len(trainable_variables):
326 (trainable_variables[trainable_at_start:],))
415 def trainable_variables(self): member in Template
428 trainable_variables = set(self.trainable_variables)
429 return [x for x in global_variables if x not in trainable_variables]
457 return self.trainable_variables
519 def trainable_variables(self): member in _EagerTemplateVariableStore
521 self._eager_variable_store.trainable_variables())
587 trainable_at_start = self._template_store.trainable_variables()
[all …]
/external/tensorflow/tensorflow/python/layers/
Dconvolutional_test.py267 self.assertEqual(len(variables.trainable_variables()), 2)
269 self.assertEqual(len(variables.trainable_variables()), 2)
277 self.assertEqual(len(variables.trainable_variables()), 2)
280 self.assertEqual(len(variables.trainable_variables()), 2)
290 weights = variables.trainable_variables()
306 self.assertEqual(len(variables.trainable_variables()), 2)
308 self.assertEqual(len(variables.trainable_variables()), 4)
441 self.assertEqual(len(variables.trainable_variables()), 3)
443 self.assertEqual(len(variables.trainable_variables()), 3)
451 self.assertEqual(len(variables.trainable_variables()), 3)
[all …]
Dcore_test.py78 self.assertListEqual(dense.trainable_variables,
108 self.assertListEqual(dense.trainable_variables, [dense.kernel])
124 self.assertListEqual(dense.trainable_variables, [])
256 vars1 = variables.trainable_variables()
258 vars2 = variables.trainable_variables()
267 vars1 = variables.trainable_variables()
270 vars2 = variables.trainable_variables()
/external/tensorflow/tensorflow/python/kernel_tests/
Dtemplate_test.py349 self.assertEqual(nested1.trainable_variables, [v1])
350 self.assertEqual(nested2.trainable_variables, [v2])
366 self.assertEqual(tmpl1.trainable_variables, [v1, v2])
372 self.assertSequenceEqual(tmpl2.trainable_variables, [v5, v6])
385 self.assertEqual(model.trainable_variables, [v1, v2])
389 self.assertEqual(model.trainable_variables, [v1, v2, v5, v6])
432 self.assertEqual(nested1.trainable_variables, v1)
433 self.assertEqual(nested2.trainable_variables, v2)
657 self.assertEqual([], list(ta.trainable_variables))
658 self.assertEqual([], list(tb.trainable_variables))
[all …]
Dmap_fn_test.py107 self.assertEqual(len(variables.trainable_variables()), 1)
108 self.assertEqual(variables.trainable_variables()[0].name,
116 self.assertEqual(len(variables.trainable_variables()), 1)
/external/tensorflow/tensorflow/compiler/tests/
Dadadelta_test.py80 self.assertFalse(slot[0] in variables.trainable_variables())
84 self.assertFalse(slot_update[0] in variables.trainable_variables())
88 self.assertFalse(slot[1] in variables.trainable_variables())
92 self.assertFalse(slot_update[1] in variables.trainable_variables())
Dmomentum_test.py58 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/contrib/rnn/python/kernel_tests/
Dfused_rnn_cell_test.py56 v for v in variables.trainable_variables()
71 v for v in variables.trainable_variables()
92 v for v in variables.trainable_variables()
127 v for v in variables.trainable_variables()
148 v for v in variables.trainable_variables()
/external/tensorflow/tensorflow/contrib/cudnn_rnn/python/kernel_tests/
Dcudnn_rnn_ops_benchmark.py136 trainable_variables = ops.get_collection(
139 trainable_variables)
160 trainable_variables = ops.get_collection(
163 trainable_variables)
/external/tensorflow/tensorflow/contrib/optimizer_v2/
Dadadelta_test.py80 self.assertFalse(slot[0] in variables.trainable_variables())
84 self.assertFalse(slot_update[0] in variables.trainable_variables())
88 self.assertFalse(slot[1] in variables.trainable_variables())
92 self.assertFalse(slot_update[1] in variables.trainable_variables())
/external/tensorflow/tensorflow/python/training/
Dadadelta_test.py90 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/
Dgradients_test.py148 weights = variables.trainable_variables()
175 return gradient_ops.gradients(activation, variables.trainable_variables())
181 loop_fn_dtypes = [x.dtype for x in variables.trainable_variables()]
199 return gradient_ops.gradients(output, variables.trainable_variables())
210 loop_fn_dtypes = [x.dtype for x in variables.trainable_variables()]
295 return gradient_ops.gradients(loss, variables.trainable_variables())
299 loop_fn, [dtypes.float32] * len(variables.trainable_variables()),
322 logits, variables.trainable_variables(), use_pfor=use_pfor)
329 [dtypes.float32] * len(variables.trainable_variables()), batch_size)
338 jacobians = gradients.jacobian(output, variables.trainable_variables())
[all …]
/external/tensorflow/tensorflow/python/saved_model/
Dsave_test.py61 trainable_variables = self.dense.trainable_variables
62 gradients = tape.gradient(loss, trainable_variables)
63 self.optimizer.apply_gradients(zip(gradients, trainable_variables))
409 trainable_variables = self.dense.trainable_variables
410 gradients = tape.gradient(loss, trainable_variables)
411 self.optimizer.apply_gradients(zip(gradients, trainable_variables))
/external/tensorflow/tensorflow/contrib/opt/python/training/
Delastic_average_optimizer.py251 var_list = variables.trainable_variables()
255 for v, lv in zip(variables.trainable_variables(),
378 local_vars = variables.trainable_variables()
426 var_list = variables.trainable_variables()
435 for tvar in variables.trainable_variables():
/external/tensorflow/tensorflow/contrib/layers/python/layers/
Drev_block_lib_test.py130 fg_vars = vs.trainable_variables()
223 [x] + variables.trainable_variables())
283 outputs_and_vars.append((out, vs.trainable_variables()))
319 tvars = variables.trainable_variables()
341 tvars = variables.trainable_variables()
368 tvars = variables.trainable_variables()
/external/tensorflow/tensorflow/examples/saved_model/integration_tests/
Dutil.py57 self._trainable_weights = [v for v in func.trainable_variables]
58 trainable_variables_set = set(func.trainable_variables)
Dexport_mnist_cnn.py129 obj.trainable_variables = model.trainable_variables
130 obj.variables = model.trainable_variables + model.non_trainable_variables
/external/tensorflow/tensorflow/contrib/gan/python/eval/python/
Dclassifier_metrics_test.py241 self.assertListEqual([], variables.trainable_variables())
265 self.assertListEqual([], variables.trainable_variables())
285 self.assertListEqual([], variables.trainable_variables())
297 self.assertListEqual([], variables.trainable_variables())
309 self.assertListEqual([], variables.trainable_variables())
321 self.assertListEqual([], variables.trainable_variables())
/external/tensorflow/tensorflow/python/module/
Dmodule_test.py201 self.assertEqual(m.trainable_variables,
203 self.assertEqual(m.child.trainable_variables,
205 self.assertEqual(m.child.child.trainable_variables, (m.child.child.w,))
209 self.assertEqual(len(m.trainable_variables), 0)
210 self.assertEqual(len(m.child.trainable_variables), 0)
211 self.assertEqual(len(m.child.child.trainable_variables), 0)
/external/tensorflow/tensorflow/contrib/distribute/python/
Dmonitor_test.py53 self.assertEqual(1, len(layer.trainable_variables))
54 mirrored_weight_variable = layer.trainable_variables[0]
/external/tensorflow/tensorflow/contrib/eager/python/examples/revnet/
Drevnet.py160 [x] + self._final_block.trainable_variables)
178 y, self._init_block.trainable_variables, output_gradients=dy)
191 for g, v in zip(grads, self.trainable_variables)
Drevnet_test.py38 zip(grads, model.trainable_variables), global_step=global_step)
107 vars_ = self.model.trainable_variables
135 vars_ = self.model.trainable_variables
163 zip(grads, model.trainable_variables), global_step=global_step)
Dblocks.py193 gy1, [y1] + self.g.trainable_variables, output_gradients=dy2)
205 fx2, [x2] + self.f.trainable_variables, output_gradients=dx1)
229 gy1, [y1] + self.g.trainable_variables, output_gradients=dy2)
243 fx2, [x2] + self.f.trainable_variables, output_gradients=dz1)
/external/tensorflow/tensorflow/contrib/training/python/training/
Dtraining.py431 variables_to_train = tf_variables.trainable_variables()
435 assert v.trainable or v in tf_variables.trainable_variables()
/external/tensorflow/tensorflow/python/eager/
Ddef_function_test.py59 trainable_variables = self.trainable_variables
60 gradients = tape.gradient(loss, trainable_variables)
61 self.optimizer.apply_gradients(zip(gradients, trainable_variables))

12345678910>>...19