Home
last modified time | relevance | path

Searched refs:x_train (Results 1 – 25 of 45) sorted by relevance

12

/external/tensorflow/tensorflow/python/keras/
Dintegration_test.py40 (x_train, y_train), _ = testing_utils.get_test_data(
51 input_shape=x_train.shape[1:])
57 history = model.fit(x_train, y_train, epochs=10, batch_size=10,
58 validation_data=(x_train, y_train),
61 _, val_acc = model.evaluate(x_train, y_train)
63 predictions = model.predict(x_train)
64 self.assertEqual(predictions.shape, (x_train.shape[0], 2))
70 (x_train, y_train), _ = testing_utils.get_test_data(
83 input_shape=x_train.shape[1:])
84 x = keras.layers.Input(x_train.shape[1:])
[all …]
Dcallbacks_v1_test.py53 (x_train, y_train), (x_test, y_test) = testing_utils.get_test_data(
63 max_batch_index = len(x_train) // BATCH_SIZE
69 yield (x_train[i * BATCH_SIZE:(i + 1) * BATCH_SIZE],
100 x_train,
110 x_train,
121 len(x_train),
132 len(x_train),
141 len(x_train),
150 data_generator(True), len(x_train), epochs=2, callbacks=cbks)
162 (x_train, y_train), (x_test, y_test) = testing_utils.get_test_data(
[all …]
Dregularizers_test.py44 (x_train, y_train), (x_test, y_test) = testing_utils.get_test_data(
51 return (x_train, y_train), (x_test, y_test)
60 (x_train, y_train), _ = self.get_data()
64 model.fit(x_train, y_train, batch_size=10,
75 (x_train, y_train), _ = self.get_data()
79 model.fit(x_train, y_train, batch_size=10,
Dcallbacks_test.py283 (x_train, y_train), (x_test, y_test) = testing_utils.get_test_data(
311 x_train,
331 x_train,
352 x_train,
372 x_train,
390 x_train,
415 x_train,
439 (x_train, y_train), (x_test, y_test) = testing_utils.get_test_data(
465 x_train,
568 (x_train, y_train), (x_test, y_test) = testing_utils.get_test_data(
[all …]
Doptimizers_test.py47 (x_train, y_train), _ = testing_utils.get_test_data(
50 model = _get_model(x_train.shape[1], 20, y_train.shape[1])
55 history = model.fit(x_train, y_train, epochs=2, batch_size=16, verbose=0)
79 input_shape=(x_train.shape[1],),
92 model.train_on_batch(x_train[:10], y_train[:10])
/external/tensorflow/tensorflow/contrib/distribute/python/
Dkeras_correctness_test_base.py158 with_distribution, x_train, y_train, x_predict): argument
167 'x': x_train,
175 training_inputs['validation_data'] = (x_train, y_train)
179 'x': x_train,
186 training_data_size = get_data_size(x_train)
194 train_dataset = dataset_ops.Dataset.from_tensor_slices((x_train, y_train))
208 eval_dataset = dataset_ops.Dataset.from_tensor_slices((x_train, y_train))
344 x_train = np.random.randint(0, 2, num_samples)
345 x_train = np.reshape(x_train, (num_samples, 1))
346 y_train = x_train
[all …]
Dkeras_dnn_correctness_test.py69 x_train = np.random.rand(num_samples, 1)
70 y_train = 3 * x_train
71 x_train = x_train.astype('float32')
74 return x_train, y_train, x_predict
106 x_train, y_train, _ = self.get_data()
112 train_dataset = dataset_ops.Dataset.from_tensor_slices((x_train, y_train))
Dkeras_backward_compat_test.py93 (x_train, y_train), _ = testing_utils.get_test_data(
100 dataset = dataset_ops.Dataset.from_tensor_slices((x_train, y_train))
213 x_train, y_train, x_predict): argument
229 'x': x_train,
237 training_inputs['validation_data'] = (x_train, y_train)
241 'x': x_train,
251 (x_train, y_train))
261 'steps_per_epoch': len(x_train) // global_batch_size,
266 (x_train, y_train))
923 x_train = np.random.randint(0, 2, num_samples)
[all …]
Dkeras_image_model_correctness_test.py74 x_train = np.asarray(features, dtype=np.float32)
76 x_predict = x_train
77 return x_train, y_train, x_predict
Dkeras_embedding_model_correctness_test.py134 x_train = {
138 x_predict = x_train
140 return x_train, y_train, x_predict
/external/libopus/scripts/
Drnn_train.py45 x_train = all_data[:nb_sequences*window_size, :-2] variable
46 x_train = np.reshape(x_train, (nb_sequences, window_size, 25)) variable
52 x_train = x_train.astype('float32') variable
55 print(len(x_train), 'train sequences. x shape =', x_train.shape, 'y shape = ', y_train.shape)
63 model.fit(x_train, y_train,
66 validation_data=(x_train, y_train))
/external/tensorflow/tensorflow/python/keras/utils/
Dio_utils_test.py63 x_train = keras.utils.io_utils.HDF5Matrix(
89 model.fit(x_train, y_train, batch_size=32, shuffle='batch', verbose=False)
100 self.assertEqual(len(x_train[0:]), len(x_train))
104 _ = x_train[1000]
106 _ = x_train[1000: 1001]
108 _ = x_train[[1000, 1001]]
110 _ = x_train[six.moves.range(1000, 1001)]
112 _ = x_train[np.array([1000])]
114 _ = x_train[None]
120 self.assertAllClose(normalized_x_train[0][0], x_train[0][0] + 1)
/external/tensorflow/tensorflow/contrib/distribute/python/examples/
Dkeras_mnist.py45 (x_train, y_train), (x_test, y_test) = tf.keras.datasets.mnist.load_data()
48 x_train = x_train.reshape(x_train.shape[0], 1, img_rows, img_cols)
52 x_train = x_train.reshape(x_train.shape[0], img_rows, img_cols, 1)
56 x_train = x_train.astype('float32')
58 x_train /= 255
66 train_ds = tf.data.Dataset.from_tensor_slices((x_train, y_train))
Dmnist_eager_multigpu.py74 (x_train, y_train), (x_test, y_test) = tf.keras.datasets.mnist.load_data()
76 x_train, x_test = x_train / np.float32(255), x_test / np.float32(255)
80 train_dataset = tf.data.Dataset.from_tensor_slices((x_train, y_train))
Dmnist_tf1_tpu.py72 (x_train, y_train), (x_test, y_test) = tf.keras.datasets.mnist.load_data()
74 x_train, x_test = x_train / np.float32(255), x_test / np.float32(255)
78 train_dataset = tf.data.Dataset.from_tensor_slices((x_train, y_train))
/external/tensorflow/tensorflow/python/keras/datasets/
Dimdb.py86 x_train, labels_train = f['x_train'], f['y_train']
90 indices = np.arange(len(x_train))
92 x_train = x_train[indices]
100 xs = np.concatenate([x_train, x_test])
127 idx = len(x_train)
128 x_train, y_train = np.array(xs[:idx]), np.array(labels[:idx])
131 return (x_train, y_train), (x_test, y_test)
Dcifar10.py44 x_train = np.empty((num_train_samples, 3, 32, 32), dtype='uint8')
49 (x_train[(i - 1) * 10000:i * 10000, :, :, :],
59 x_train = x_train.transpose(0, 2, 3, 1)
62 return (x_train, y_train), (x_test, y_test)
Dcifar100.py52 x_train, y_train = load_batch(fpath, label_key=label_mode + '_labels')
61 x_train = x_train.transpose(0, 2, 3, 1)
64 return (x_train, y_train), (x_test, y_test)
Dmnist.py51 x_train, y_train = f['x_train'], f['y_train']
54 return (x_train, y_train), (x_test, y_test)
Dboston_housing.py58 x_train = np.array(x[:int(len(x) * (1 - test_split))])
62 return (x_train, y_train), (x_test, y_test)
/external/tensorflow/tensorflow/python/keras/layers/
Dlstm_v2_test.py316 (x_train, y_train), _ = testing_utils.get_test_data(
330 y_1 = lstm_model.predict(x_train)
332 lstm_model.fit(x_train, y_train)
333 y_2 = lstm_model.predict(x_train)
339 y_3 = cudnn_model.predict(x_train)
341 cudnn_model.fit(x_train, y_train)
342 y_4 = cudnn_model.predict(x_train)
416 x_train = np.random.random((batch, timestep, input_shape))
437 y_ref = lstm_model.predict(x_train)
442 y = unified_lstm_model.predict(x_train)
[all …]
Dgru_v2_test.py89 (x_train, y_train), _ = testing_utils.get_test_data(
104 model.fit(x_train, y_train, epochs=epoch)
105 model.evaluate(x_train, y_train)
106 model.predict(x_train)
148 (x_train, y_train), _ = testing_utils.get_test_data(
163 y_1 = gru_model.predict(x_train)
165 gru_model.fit(x_train, y_train)
166 y_2 = gru_model.predict(x_train)
174 y_3 = cudnn_model.predict(x_train)
176 cudnn_model.fit(x_train, y_train)
[all …]
/external/tensorflow/tensorflow/python/keras/wrappers/
Dscikit_learn_test.py51 (x_train, y_train), (x_test, _) = testing_utils.get_test_data(
57 clf.fit(x_train, y_train, batch_size=BATCH_SIZE, epochs=EPOCHS)
59 score = clf.score(x_train, y_train, batch_size=BATCH_SIZE)
87 (x_train, y_train), (x_test, _) = testing_utils.get_test_data(
93 reg.fit(x_train, y_train, batch_size=BATCH_SIZE, epochs=EPOCHS)
95 score = reg.score(x_train, y_train, batch_size=BATCH_SIZE)
/external/tensorflow/tensorflow/examples/get_started/regression/
Dimports85.py197 x_train = data.sample(frac=train_fraction, random_state=seed)
198 x_test = data.drop(x_train.index)
201 y_train = x_train.pop(y_name)
204 return (x_train, y_train), (x_test, y_test)
/external/tensorflow/tensorflow/examples/saved_model/integration_tests/
Dmnist_util.py32 x_train = x_test = np.zeros((num_fakes, 28, 28), dtype=np.uint8)
37 (x_train, y_train), (x_test, y_test) = mnist.load_data()
38 return ((_prepare_image(x_train), _prepare_label(y_train)),

12