Home
last modified time | relevance | path

Searched refs:tape (Results 1 – 25 of 120) sorted by relevance

12345

/external/tensorflow/tensorflow/python/eager/
Dtape.py38 def __init__(self, tape): argument
39 self._tape = tape
47 tape = pywrap_tensorflow.TFE_Py_TapeSetNew(persistent,
49 return Tape(tape)
52 def push_tape(tape): argument
54 pywrap_tensorflow.TFE_Py_TapeSetAdd(tape._tape) # pylint: disable=protected-access
57 def watch(tape, tensor): argument
59 pywrap_tensorflow.TFE_Py_TapeWatch(tape._tape, tensor) # pylint: disable=protected-access
62 def watch_variable(tape, variable): argument
71 pywrap_tensorflow.TFE_Py_TapeWatchVariable(tape._tape, var) # pylint: disable=protected-access
[all …]
Dpywrap_tfe_test.py79 with backprop.GradientTape(persistent=True) as tape:
81 tape.watch(a_2_by_2)
85 dz_dy = tape.gradient(z, [a_2_by_2])[0]
93 with backprop.GradientTape(persistent=True) as tape:
96 tape.watch(m)
100 dz_dy = tape.gradient(z, [m])[0]
126 with backprop.GradientTape(persistent=True) as tape:
127 tape.watch(a_2_by_2)
128 tape.watch(b_2_by_2)
133 dz1_dy = tape.gradient(z1, [a_2_by_2])[0]
[all …]
Dpywrap_tfe.h142 void TFE_Py_TapeSetRemove(PyObject* tape);
145 void TFE_Py_TapeSetAdd(PyObject* tape);
151 void TFE_Py_TapeWatch(PyObject* tape, PyObject* tensor);
175 void TFE_Py_TapeWatchVariable(PyObject* tape, PyObject* variable);
182 PyObject* TFE_Py_TapeGradient(PyObject* tape, PyObject* target,
215 PyObject* TFE_Py_TapeWatchedVariables(PyObject* tape);
Dpywrap_tfe_src.cc1256 GradientTape* tape; member
1259 static void TFE_Py_Tape_Delete(PyObject* tape) { in TFE_Py_Tape_Delete() argument
1260 delete reinterpret_cast<TFE_Py_Tape*>(tape)->tape; in TFE_Py_Tape_Delete()
1261 Py_TYPE(tape)->tp_free(tape); in TFE_Py_Tape_Delete()
1305 for (auto* tape : tape_set_) { in SafeTapeSet() local
1306 Py_INCREF(tape); in SafeTapeSet()
1311 for (auto* tape : tape_set_) { in ~SafeTapeSet() local
1312 Py_DECREF(tape); in ~SafeTapeSet()
1341 TFE_Py_Tape* tape = PyObject_NEW(TFE_Py_Tape, &TFE_Py_Tape_Type); in TFE_Py_TapeSetNew() local
1342 tape->tape = new GradientTape(persistent == Py_True, in TFE_Py_TapeSetNew()
[all …]
Dbackprop.py31 from tensorflow.python.eager import tape
197 this_tape = tape.push_new_tape()
205 tape.pop_tape(this_tape)
509 this_tape = tape.push_new_tape(persistent=persistent)
520 tape.watch(this_tape, args[i])
530 tape.pop_tape(this_tape)
783 self._tape = tape.push_new_tape(
787 tape.push_tape(self._tape)
793 tape.pop_tape(self._tape)
816 tape.watch_variable(self._tape, t)
[all …]
Dmemory_test.py116 with backprop.GradientTape() as tape:
119 tape.gradient(result, net.variables)
121 del tape
Dimperative_grad.py33 tape, argument
68 tape._tape, # pylint: disable=protected-access
Dbackprop_test.py329 with backprop.GradientTape(persistent=True) as tape:
330 tape.watch(a_2_by_2)
331 dy_dy = tape.gradient(a_2_by_2, [a_2_by_2])[0]
338 with backprop.GradientTape(persistent=True) as tape:
339 tape.watch(a_2_by_2)
340 dy_dy = tape.gradient([a_2_by_2, a_2_by_2], [a_2_by_2])[0]
1169 with backprop.GradientTape() as tape:
1170 tape.watch(x)
1174 return self.evaluate(tape.gradient(y, x))
1185 with backprop.GradientTape(watch_accessed_variables=False) as tape:
[all …]
Dwrap_function_test.py163 with backprop.GradientTape() as tape:
164 tape.watch(x)
166 grads = tape.gradient(out, [x, v1, v2_holder[0]])
176 with backprop.GradientTape() as tape:
177 tape.watch(x)
179 grads = tape.gradient(out, [x, v1, v2_holder[0]])
DBUILD31 "//tensorflow/c/eager:tape",
63 ":tape",
132 name = "tape",
133 srcs = ["tape.py"],
369 "//tensorflow/python/eager:tape",
394 "//tensorflow/python/eager:tape",
/external/tensorflow/tensorflow/python/kernel_tests/
Drelu_op_test.py126 with backprop.GradientTape() as tape:
127 tape.watch(x)
129 return tape.gradient(y, x)
175 with backprop.GradientTape() as tape:
176 tape.watch(x)
178 return tape.gradient(y, x)
194 with backprop.GradientTape() as tape:
195 tape.watch(x)
197 return tape.gradient(y, x)
348 with backprop.GradientTape() as tape:
[all …]
Dlist_ops_test.py126 with backprop.GradientTape() as tape:
131 tape.watch(c0)
132 tape.watch(c1)
141 dt0, dt1 = tape.gradient(t1, [c0, c1])
299 with backprop.GradientTape() as tape:
305 tape.watch(c0)
311 dt = tape.gradient(s, c0)
401 with backprop.GradientTape(persistent=True) as tape:
405 tape.watch(c)
410 dt = tape.gradient(s, c)
[all …]
/external/clang/test/SemaCXX/
Dconstexpr-turing.cpp10 bool tape; member
35 constexpr unsigned run(const State *tm, const Tape &tape, unsigned state) { in run() argument
37 run(tm, move(update(tape, tm[state][tape.val].tape), in run()
38 tm[state][tape.val].dir), in run()
39 tm[state][tape.val].next) + 1; in run()
/external/tensorflow/tensorflow/contrib/eager/python/examples/revnet/
Dops_test.py46 with tfe.GradientTape() as tape:
47 tape.watch(x)
51 grad, = tape.gradient(y, [x], output_gradients=[dy])
69 with tfe.GradientTape() as tape:
70 tape.watch(x)
74 grad, = tape.gradient(y, [x], output_gradients=[dy])
Dblocks_test.py144 with tf.GradientTape() as tape:
145 tape.watch(x)
155 grads = tape.gradient(y, [x] + vars_, output_gradients=dy)
173 with tf.GradientTape() as tape:
174 tape.watch(x)
184 grads = tape.gradient(y, [x] + vars_, output_gradients=dy)
207 with tf.GradientTape() as tape:
208 tape.watch(x)
214 dx_true = tape.gradient(y, x, output_gradients=dy)
247 with tf.GradientTape() as tape:
[all …]
Drevnet.py155 with tf.GradientTape() as tape:
156 tape.watch(x)
159 grads_combined = tape.gradient(loss,
175 with tf.GradientTape() as tape:
177 init_grads = tape.gradient(
/external/tensorflow/tensorflow/compiler/tests/
Deager_test.py61 with backprop.GradientTape(persistent=True) as tape:
62 tape.watch(x)
63 tape.watch(y)
65 da_dx = tape.gradient(a, x)
66 da_dy = tape.gradient(a, y)
267 with backprop.GradientTape() as tape:
269 dy_dx = tape.gradient(y, x)
281 with backprop.GradientTape() as tape:
284 dy_dx = tape.gradient(y, embedding_matrix)
440 with backprop.GradientTape() as tape:
[all …]
/external/tensorflow/tensorflow/python/ops/
Dcustom_gradient.py24 from tensorflow.python.eager import tape as tape_lib
182 with backprop.GradientTape() as tape:
195 variables = list(set(tape.watched_variables()) - set(args))
258 with backprop.GradientTape() as tape:
263 variables = [v for v in set(tape.watched_variables()) if v not in all_inputs]
Dscript_ops.py104 with context.eager_mode(), backprop.GradientTape() as tape:
106 tape.watch(tensor)
120 tape_cache[compat.as_bytes(token)] = (tape, args, outputs)
297 tape, eager_inputs, eager_outputs = tape_cache.pop(compat.as_bytes(token))
298 return tape.gradient(eager_outputs, eager_inputs, output_gradients=dy)
Dmath_grad_test.py418 with backprop.GradientTape() as tape:
419 tape.watch(x)
420 g = tape.gradient(math_ops.pow(x, 2), x)
429 with backprop.GradientTape() as tape:
430 tape.watch(x1)
431 tape.watch(x2)
433 return tape.gradient(y, [x1, x2])
/external/tensorflow/tensorflow/python/training/tracking/
Dutil_test.py270 with backprop.GradientTape() as tape:
273 gradients = tape.gradient(loss, variables)
278 with backprop.GradientTape() as tape:
281 gradients = tape.gradient(loss, variables)
404 with backprop.GradientTape() as tape:
407 gradients = tape.gradient(loss, variables)
481 with backprop.GradientTape() as tape:
484 gradients = tape.gradient(loss, variables)
503 with backprop.GradientTape() as tape:
506 gradients = tape.gradient(loss, variables)
[all …]
Dutil_xla_test.py72 with backprop.GradientTape() as tape:
75 gradients = tape.gradient(loss, variables)
/external/tensorflow/tensorflow/python/keras/layers/
Dembeddings_test.py91 with backprop.GradientTape() as tape:
93 gs = tape.gradient(output, l.weights)
/external/tensorflow/tensorflow/python/kernel_tests/distributions/
Dexponential_test.py178 with backprop.GradientTape() as tape:
179 tape.watch(lam)
182 grad_lam = tape.gradient(samples, lam)
/external/tensorflow/tensorflow/contrib/distribute/python/
Dstrategy_test_lib.py456 with backprop.GradientTape() as tape:
457 tape.watch(x)
459 return tape.gradient(y, x)
550 with backprop.GradientTape() as tape:
551 tape.watch(x)
553 return tape.gradient(y, x)

12345