Home
last modified time | relevance | path

Searched refs:tf (Results 1 – 25 of 873) sorted by relevance

12345678910>>...35

/external/tensorflow/tensorflow/go/op/
Dwrappers.go23 import tf "github.com/tensorflow/tensorflow/tensorflow/go" packageName
29 func makeOutputList(op *tf.Operation, start int, output string) ([]tf.Output, int, error) {
34 list := make([]tf.Output, size)
80tf.Output, inputs tf.Output, min tf.Output, max tf.Output, optional ...FakeQuantWithMinMaxVarsPerC…
88 opspec := tf.OpSpec{
90 Input: []tf.Input{
131 …nel(scope *Scope, inputs tf.Output, min tf.Output, max tf.Output, optional ...FakeQuantWithMinMaxV…
139 opspec := tf.OpSpec{
141 Input: []tf.Input{
186tf.Output, inputs tf.Output, min tf.Output, max tf.Output, optional ...FakeQuantWithMinMaxVarsGrad…
[all …]
Dgradients_test.go23 tf "github.com/tensorflow/tensorflow/tensorflow/go" packageName
29 x1 = Placeholder(s.SubScope("x1"), tf.Float)
30 x2 = Placeholder(s.SubScope("x2"), tf.Float)
33 y2 = AddN(s.SubScope("y2"), []tf.Output{y0, x2})
36 grads0 := Gradients(s, []tf.Output{y1}, []tf.Output{x1})
43 if grads0[0].DataType() != tf.Float {
44 t.Fatalf("Got DataType %v, wanted %v", grads0[0].DataType(), tf.Float)
48 grads1 := Gradients(sub, []tf.Output{y2}, []tf.Output{x1, x2})
55 if grads1[0].DataType() != tf.Float {
56 t.Fatalf("Got DataType %v, wanted %v", grads1[0].DataType(), tf.Float)
[all …]
/external/curl/packages/vms/
Dconfig_h.com171 $ write tf ""
172 $ write tf -
174 $ write tf -
176 $ write tf -
180 $ write tf -
183 $ write tf -
361 $ write tf "#endif"
369 $ write tf "#ifndef ''key2'"
370 $ write tf "#define ''key2' 1"
371 $ write tf "#endif"
[all …]
/external/blktrace/iowatcher/
Dmain.c156 static void alloc_mpstat_gld(struct trace_file *tf) in alloc_mpstat_gld() argument
160 if (tf->trace->mpstat_num_cpus == 0) in alloc_mpstat_gld()
163 ptr = calloc((tf->trace->mpstat_num_cpus + 1) * MPSTAT_GRAPHS, in alloc_mpstat_gld()
169 tf->mpstat_gld = ptr; in alloc_mpstat_gld()
243 struct trace_file *tf; in add_trace_file() local
245 tf = calloc(1, sizeof(*tf)); in add_trace_file()
246 if (!tf) { in add_trace_file()
250 tf->label = ""; in add_trace_file()
251 tf->filename = strdup(filename); in add_trace_file()
252 list_add_tail(&tf->list, &all_traces); in add_trace_file()
[all …]
/external/tensorflow/tensorflow/examples/speech_commands/
Dmodels.py24 import tensorflow as tf namespace
157 saver = tf.train.Saver(tf.global_variables())
187 dropout_prob = tf.placeholder(tf.float32, name='dropout_prob')
190 weights = tf.get_variable(
192 initializer=tf.truncated_normal_initializer(stddev=0.001),
194 bias = tf.get_variable(
195 name='bias', initializer=tf.zeros_initializer, shape=[label_count])
196 logits = tf.matmul(fingerprint_input, weights) + bias
252 dropout_prob = tf.placeholder(tf.float32, name='dropout_prob')
255 fingerprint_4d = tf.reshape(fingerprint_input,
[all …]
/external/tensorflow/tensorflow/lite/testing/nnapi_tflite_zip_tests/
Dnot_supported.txt9 arg_min_max/arg_min_max_input_dtype=tf.float32,input_shape=[1,1,1,3],is_arg_max=True,output_type=tf
10 arg_min_max/arg_min_max_input_dtype=tf.float32,input_shape=[1,1,1,3],is_arg_max=True,output_type=tf
11 arg_min_max/arg_min_max_input_dtype=tf.int32,input_shape=[1,1,1,3],is_arg_max=True,output_type=tf.i…
12 arg_min_max/arg_min_max_input_dtype=tf.int32,input_shape=[1,1,1,3],is_arg_max=True,output_type=tf.i…
13 arg_min_max/arg_min_max_input_dtype=tf.float32,input_shape=[2,3,4,5],is_arg_max=True,output_type=tf
14 arg_min_max/arg_min_max_input_dtype=tf.float32,input_shape=[2,3,4,5],is_arg_max=True,output_type=tf
15 arg_min_max/arg_min_max_input_dtype=tf.int32,input_shape=[2,3,4,5],is_arg_max=True,output_type=tf.i…
16 arg_min_max/arg_min_max_input_dtype=tf.int32,input_shape=[2,3,4,5],is_arg_max=True,output_type=tf.i…
17 arg_min_max/arg_min_max_input_dtype=tf.float32,input_shape=[2,3,3],is_arg_max=True,output_type=tf.i…
18 arg_min_max/arg_min_max_input_dtype=tf.float32,input_shape=[2,3,3],is_arg_max=True,output_type=tf.i…
[all …]
Dtest_manifest.txt1 add/add_activation=True,dtype=tf.float32,input_shape_1=[1,3,4,3],input_shape_2=[1,3,4,3]
2 DISABLED_add/add_activation=True,dtype=tf.int32,input_shape_1=[1,3,4,3],input_shape_2=[1,3,4,3]
3 add/add_activation=False,dtype=tf.float32,input_shape_1=[5],input_shape_2=[5]
4 add/add_activation=True,dtype=tf.float32,input_shape_1=[5],input_shape_2=[5]
5 add/add_activation=True,dtype=tf.float32,input_shape_1=[1,3,4,3],input_shape_2=[3]
6 add/add_activation=False,dtype=tf.float32,input_shape_1=[1,3,4,3],input_shape_2=[3]
7 DISABLED_add/add_activation=True,dtype=tf.int32,input_shape_1=[1,3,4,3],input_shape_2=[3]
8 DISABLED_add/add_activation=False,dtype=tf.int32,input_shape_1=[1,3,4,3],input_shape_2=[3]
9 DISABLED_add/add_activation=True,dtype=tf.int64,input_shape_1=[1,3,4,3],input_shape_2=[3]
10 DISABLED_add/add_activation=False,dtype=tf.int64,input_shape_1=[1,3,4,3],input_shape_2=[3]
[all …]
/external/tensorflow/tensorflow/examples/tutorials/mnist/
Dmnist_with_summaries.py31 import tensorflow as tf namespace
43 sess = tf.InteractiveSession()
47 with tf.name_scope('input'):
48 x = tf.placeholder(tf.float32, [None, 784], name='x-input')
49 y_ = tf.placeholder(tf.int64, [None], name='y-input')
51 with tf.name_scope('input_reshape'):
52 image_shaped_input = tf.reshape(x, [-1, 28, 28, 1])
53 tf.summary.image('input', image_shaped_input, 10)
58 initial = tf.truncated_normal(shape, stddev=0.1)
59 return tf.Variable(initial)
[all …]
Dmnist.py35 import tensorflow as tf namespace
57 with tf.name_scope('hidden1'):
58 weights = tf.Variable(
59 tf.truncated_normal([IMAGE_PIXELS, hidden1_units],
62 biases = tf.Variable(tf.zeros([hidden1_units]),
64 hidden1 = tf.nn.relu(tf.matmul(images, weights) + biases)
66 with tf.name_scope('hidden2'):
67 weights = tf.Variable(
68 tf.truncated_normal([hidden1_units, hidden2_units],
71 biases = tf.Variable(tf.zeros([hidden2_units]),
[all …]
/external/tensorflow/tensorflow/tools/compatibility/testdata/
Dtest_file_v0_11.py23 import tensorflow as tf namespace
47 tf.reduce_any(
50 tf.reduce_all(
53 tf.reduce_all(
56 tf.reduce_sum(
59 tf.reduce_sum(
61 self.assertAllEqual(tf.reduce_sum(a, [0, 1]).eval(), 21.0)
63 tf.reduce_prod(
66 tf.reduce_prod(
68 self.assertAllEqual(tf.reduce_prod(a, [0, 1]).eval(), 720.0)
[all …]
/external/tensorflow/tensorflow/lite/testing/
Dgenerate_examples.py52 import tensorflow as tf namespace
235 tf.float32: (np.float32, "FLOAT"),
236 tf.float16: (np.float16, "FLOAT"),
237 tf.int32: (np.int32, "INT32"),
238 tf.uint8: (np.uint8, "QUANTIZED_UINT8"),
239 tf.int16: (np.int16, "QUANTIZED_INT16"),
240 tf.int64: (np.int64, "INT64"),
241 tf.bool: (np.bool, "BOOL"),
242 tf.string: (np.string_, "STRING"),
252 if dtype in (tf.float32, tf.float16):
[all …]
/external/tensorflow/tensorflow/examples/saved_model/integration_tests/
Dexport_text_rnn_model.py24 import tensorflow.compat.v2 as tf namespace
31 class TextRnnModel(tf.train.Checkpoint):
41 self._lstm_cell = tf.keras.layers.LSTMCell(units=state_size)
42 self._rnn_layer = tf.keras.layers.RNN(
44 self._embeddings = tf.Variable(tf.random.uniform(shape=[buckets, emb_dim]))
45 self._logit_layer = tf.keras.layers.Dense(buckets)
51 normalized_sentences = tf.strings.regex_replace(
53 sparse_tokens = tf.strings.split(normalized_sentences, " ")
56 sparse_tokens, _ = tf.sparse.fill_empty_rows(sparse_tokens, tf.constant(""))
58 sparse_tokens = tf.sparse.reset_shape(sparse_tokens)
[all …]
/external/tensorflow/tensorflow/contrib/model_pruning/examples/cifar10/
Dcifar10_pruning.py43 import tensorflow as tf namespace
84 tf.summary.histogram(tensor_name + '/activations', x)
85 tf.summary.scalar(tensor_name + '/sparsity', tf.nn.zero_fraction(x))
99 with tf.device('/cpu:0'):
100 dtype = tf.float32
101 var = tf.get_variable(name, shape, initializer=initializer, dtype=dtype)
121 dtype = tf.float32
123 tf.truncated_normal_initializer(
126 weight_decay = tf.multiply(tf.nn.l2_loss(var), wd, name='weight_loss')
127 tf.add_to_collection('losses', weight_decay)
[all …]
/external/tensorflow/tensorflow/contrib/autograph/examples/benchmarks/
Dcartpole_benchmark.py33 import tensorflow as tf namespace
48 ag.set_element_type(rewards, tf.float32)
52 ag.set_element_type(reverse_discounted, tf.float32)
67 class GraphPolicyNetwork(tf.keras.Model):
76 self._hidden_layer = tf.keras.layers.Dense(
77 hidden_size, activation=tf.nn.elu)
78 self._output_layer = tf.keras.layers.Dense(1)
97 left_prob = tf.nn.sigmoid(logits)
98 action_probs = tf.concat([left_prob, 1.0 - left_prob], 1)
100 actions = tf.multinomial(tf.log(action_probs), 1)
[all …]
/external/tensorflow/tensorflow/contrib/eager/python/examples/revnet/
Dimagenet_input.py24 import tensorflow as tf namespace
38 image_bytes_list = tf.placeholder(
40 dtype=tf.string,
42 images = tf.map_fn(
43 _preprocess_image, image_bytes_list, back_prop=False, dtype=tf.float32)
44 return tf.estimator.export.ServingInputReceiver(
97 tf.TensorShape([None, None, None, batch_size])))
99 tf.TensorShape([batch_size])))
102 tf.TensorShape([batch_size, None, None, None])))
104 tf.TensorShape([batch_size])))
[all …]
Dresnet_preprocessing.py20 import tensorflow as tf namespace
57 with tf.name_scope(scope, 'distorted_bounding_box_crop', [image_bytes, bbox]):
58 shape = tf.image.extract_jpeg_shape(image_bytes)
59 sample_distorted_bounding_box = tf.image.sample_distorted_bounding_box(
70 offset_y, offset_x, _ = tf.unstack(bbox_begin)
71 target_height, target_width, _ = tf.unstack(bbox_size)
72 crop_window = tf.stack([offset_y, offset_x, target_height, target_width])
73 image = tf.image.decode_and_crop_jpeg(image_bytes, crop_window, channels=3)
80 match = tf.equal(a, b)
81 match = tf.cast(match, tf.int32)
[all …]
Dblocks_test.py21 import tensorflow as tf namespace
29 return tf.reduce_sum(u * v)
31 g1_norm = tf.sqrt(_dot(g1, g1))
32 g2_norm = tf.sqrt(_dot(g2, g2))
40 cosine = tf.minimum(tf.maximum(cosine, eps - 1.), 1. - eps)
41 degree = tf.acos(cosine) * 180. / 3.141592653589793
56 with tf.device("/cpu:0"): # NHWC format
59 x = tf.random_normal(shape=data_shape)
94 if not tf.test.is_gpu_available():
97 with tf.device("/gpu:0"): # Default NCHW format
[all …]
/external/tensorflow/tensorflow/python/debug/examples/
Ddebug_mnist.py30 import tensorflow as tf namespace
57 sess = tf.InteractiveSession()
62 with tf.name_scope("input"):
63 x = tf.placeholder(
64 tf.float32, [None, IMAGE_SIZE * IMAGE_SIZE], name="x-input")
65 y_ = tf.placeholder(tf.float32, [None, NUM_LABELS], name="y-input")
69 initial = tf.truncated_normal(shape, stddev=0.1, seed=RAND_SEED)
70 return tf.Variable(initial)
74 initial = tf.constant(0.1, shape=shape)
75 return tf.Variable(initial)
[all …]
/external/tensorflow/tensorflow/contrib/session_bundle/example/
Dexport_half_plus_two.py35 import tensorflow as tf namespace
43 with tf.Session() as sess:
46 a = tf.Variable(0.5, name="a")
47 b = tf.Variable(2.0, name="b")
50 serialized_tf_example = tf.placeholder(tf.string, name="tf_example")
54 feature_configs = {"x": tf.FixedLenFeature([1], dtype=tf.float32),}
55 tf_example = tf.parse_example(serialized_tf_example, feature_configs)
57 x = tf.identity(tf_example["x"], name="x")
60 y = tf.add(tf.multiply(a, x), b, name="y")
63 save = tf.train.Saver(
[all …]
/external/tensorflow/tensorflow/examples/tutorials/layers/
Dcnn_mnist.py21 import tensorflow as tf namespace
23 tf.logging.set_verbosity(tf.logging.INFO)
31 input_layer = tf.reshape(features["x"], [-1, 28, 28, 1])
38 conv1 = tf.layers.conv2d(
43 activation=tf.nn.relu)
49 pool1 = tf.layers.max_pooling2d(inputs=conv1, pool_size=[2, 2], strides=2)
56 conv2 = tf.layers.conv2d(
61 activation=tf.nn.relu)
67 pool2 = tf.layers.max_pooling2d(inputs=conv2, pool_size=[2, 2], strides=2)
72 pool2_flat = tf.reshape(pool2, [-1, 7 * 7 * 64])
[all …]
/external/tensorflow/tensorflow/contrib/mpi_collectives/
Dmpi_ops_test.py25 import tensorflow as tf namespace
65 class MPITests(tf.test.TestCase):
89 dtypes = [tf.int32, tf.float32]
92 tf.set_random_seed(1234)
93 tensor = tf.random_uniform([17] * dim, -100, 100, dtype=dtype)
96 max_difference = tf.reduce_max(tf.abs(summed - multiplied))
120 if not tf.test.is_gpu_available(cuda_only=True):
123 no_gpus = tf.GPUOptions(visible_device_list="")
124 cpu_config = tf.ConfigProto(gpu_options=no_gpus)
128 one_gpu = tf.GPUOptions(visible_device_list=str(local_rank))
[all …]
/external/tensorflow/tensorflow/contrib/eager/python/examples/rnn_ptb/
Drnn_ptb_graph_test.py25 import tensorflow as tf namespace
30 class PTBTest(tf.test.TestCase):
35 with tf.Graph().as_default(), tf.device(tf.test.gpu_device_name()):
36 inputs_ph = tf.placeholder(tf.int64, [sequence_length, batch_size],
38 labels_ph = tf.placeholder(tf.int64, [sequence_length, batch_size],
44 model = rnn_ptb.test_model(tf.test.is_gpu_available())
45 optimizer = tf.train.GradientDescentOptimizer(learning_rate=1.0)
50 with tf.Session() as sess:
51 sess.run(tf.global_variables_initializer())
60 class PTBBenchmark(tf.test.Benchmark):
[all …]
/external/tensorflow/tensorflow/examples/get_started/regression/
Dcustom_regression.py21 import tensorflow as tf namespace
33 top = tf.feature_column.input_layer(features, params["feature_columns"])
38 top = tf.layers.dense(inputs=top, units=units, activation=tf.nn.relu)
41 output_layer = tf.layers.dense(inputs=top, units=1)
44 predictions = tf.squeeze(output_layer, 1)
46 if mode == tf.estimator.ModeKeys.PREDICT:
48 return tf.estimator.EstimatorSpec(
52 average_loss = tf.losses.mean_squared_error(labels, predictions)
56 batch_size = tf.shape(labels)[0]
57 total_loss = tf.to_float(batch_size) * average_loss
[all …]
/external/tensorflow/tensorflow/contrib/distribute/python/examples/
Dmnist_tf1_tpu.py31 import tensorflow as tf namespace
46 max_pool = tf.keras.layers.MaxPooling2D((2, 2), (2, 2), padding="same")
49 return tf.keras.Sequential([
50 tf.keras.layers.Reshape(
53 tf.keras.layers.Conv2D(2, 5, padding="same", activation=tf.nn.relu),
55 tf.keras.layers.Conv2D(4, 5, padding="same", activation=tf.nn.relu),
57 tf.keras.layers.Flatten(),
58 tf.keras.layers.Dense(32, activation=tf.nn.relu),
59 tf.keras.layers.Dropout(0.4),
60 tf.keras.layers.Dense(10)])
[all …]
/external/tensorflow/tensorflow/tools/docs/
Ddoc_generator_visitor_test.py80 tf = types.ModuleType('tf')
81 tf.Parent = Parent
82 tf.submodule = types.ModuleType('submodule')
83 tf.submodule.Parent = Parent
86 [('tf', tf)],
112 id(tf): 'tf',
113 id(tf.submodule): 'tf.submodule',
121 tf = types.ModuleType('tf')
122 tf.contrib = types.ModuleType('contrib')
123 tf.submodule = types.ModuleType('submodule')
[all …]

12345678910>>...35