/external/tensorflow/tensorflow/contrib/losses/python/losses/ |
loss_ops_test.py | 51 self._predictions, self._predictions, weights=None) 64 weights = 2.3 66 weights) 68 self.assertAlmostEqual(5.5 * weights, loss.eval(), 3) 71 weights = 2.3 73 constant_op.constant(weights)) 75 self.assertAlmostEqual(5.5 * weights, loss.eval(), 3) 78 weights = constant_op.constant([1.2, 0.0], shape=[2,]) 80 weights) 85 weights = constant_op.constant([1.2, 0.0], shape=[2, 1] [all...] |
/external/tensorflow/tensorflow/python/ops/ |
metrics_impl.py | 53 def _remove_squeezable_dimensions(predictions, labels, weights): 58 Squeezes or expands last dim of `weights` if its rank differs by 1 from the 61 If `weights` is scalar, it is kept scalar. 69 weights: Optional weight scalar or `Tensor` whose dimensions match 73 Tuple of `predictions`, `labels` and `weights`. Each of them possibly has 74 the last dimension squeezed, `weights` could be extended by one dimension. 82 if weights is None: 85 weights = ops.convert_to_tensor(weights) 86 weights_shape = weights.get_shape( [all...] |
/external/tensorflow/tensorflow/contrib/metrics/python/ops/ |
metric_ops.py | 68 weights=None, 72 """Sum the weights of true_positives. 74 If `weights` is `None`, weights default to 1. Use weights of 0 to mask values. 81 weights: Optional `Tensor` whose rank is either 0, or the same rank as 97 `weights` is not `None` and its shape doesn't match `predictions`, or if 104 weights=weights, 112 weights=None [all...] |
/external/apache-commons-math/src/main/java/org/apache/commons/math/stat/descriptive/summary/ |
Sum.java | 138 * <li>the weights array is null</li> 139 * <li>the weights array does not have the same length as the values array</li> 140 * <li>the weights array contains one or more infinite values</li> 141 * <li>the weights array contains one or more NaN values</li> 142 * <li>the weights array contains negative values</li> 147 * weighted sum = Σ(values[i] * weights[i]) 151 * @param weights the weights array 158 public double evaluate(final double[] values, final double[] weights, 161 if (test(values, weights, begin, length)) [all...] |
/external/tensorflow/tensorflow/core/lib/random/ |
weighted_picker_test.cc | 34 static void TestPickAt(int items, const int32* weights); 64 VLOG(0) << "======= Grown picker with zero weights"; 73 VLOG(0) << "======= Shrink picker and check weights"; 95 VLOG(0) << "======= Check uniform with big weights"; 103 static const int32 weights[] = {1, 0, 200, 5, 42}; local 104 TestPickAt(TF_ARRAYSIZE(weights), weights); local 131 // Create zero weights array 132 std::vector<int32> weights(size); 134 weights[elem] = 0 [all...] |
/external/tensorflow/tensorflow/contrib/boosted_trees/lib/utils/ |
dropout_utils.h | 33 // indices and the weights they had when this method ran. 39 // weights: weights of those trees 41 // weights. 45 const std::vector<float>& weights, std::vector<int32>* dropped_trees, 48 // Recalculates the weights of the trees when the new trees are added to 56 // ensemble. Returns current_weights: updated vector of the tree weights. 57 // Weights of dropped trees are updated. Note that the size of returned vector 59 // weights of the new trees to be added) if new_trees_first_index 66 // Current weights and num_updates will be updated as a result of thi [all...] |
/external/tensorflow/tensorflow/python/keras/_impl/keras/applications/ |
nasnet_test.py | 28 model = keras.applications.NASNetMobile(weights=None) 32 model = keras.applications.NASNetMobile(weights=None, include_top=False) 36 model = keras.applications.NASNetMobile(weights=None, 43 keras.applications.NASNetMobile(weights='unknown', 46 keras.applications.NASNetMobile(weights='imagenet', 53 model = keras.applications.NASNetLarge(weights=None) 57 model = keras.applications.NASNetLarge(weights=None, include_top=False) 61 model = keras.applications.NASNetLarge(weights=None, 68 keras.applications.NASNetLarge(weights='unknown', 71 keras.applications.NASNetLarge(weights='imagenet' [all...] |
/external/tensorflow/tensorflow/python/keras/_impl/keras/engine/ |
topology.py | 77 trainable: Boolean, whether the layer weights 99 weights: The concatenation of the lists trainable_weights and 112 set_weights(weights) 145 'weights', 187 if 'weights' in kwargs: 188 self._initial_weights = kwargs['weights'] 413 def set_weights(self, weights): 414 """Sets the weights of the layer, from Numpy arrays. 417 weights: a list of Numpy arrays. The number 419 number of the dimensions of the weights [all...] |
/external/apache-commons-math/src/main/java/org/apache/commons/math/optimization/ |
LeastSquaresConverter.java | 49 * This class support combination of residuals with or without weights and correlations. 66 /** Optional weights for the residuals. */ 67 private final double[] weights; field in class:LeastSquaresConverter 80 this.weights = null; 84 /** Build a simple converter for uncorrelated residuals with the specific weights. 92 * Weights can be used for example to combine residuals with different standard 96 * In this case, the weights array should be initialized with value 102 * weights array must have consistent sizes or a {@link FunctionEvaluationException} will be 107 * @param weights weights to apply to the residual [all...] |
/external/tensorflow/tensorflow/contrib/training/python/training/ |
resample_test.py | 54 """Tests `resample(x, weights)` and resample(resample(x, rate), 1/rate)`.""" 58 weights = self.get_weights(count) 61 [foo, bar], constant_op.constant(weights), rate, seed=123) 86 self.assert_expected(weights, rate, counts_resampled, n) 90 [1.0 for _ in weights], 104 weights = self.get_weights(count) 107 constant_op.constant(weights), 131 # sum(vals) * n ~= weighted_sum(resampled, 1.0/weights) 159 """Test that we can define the ops with float64 weights.""" 162 weights = math_ops.cast(self.get_weights(count), dtypes.float64 [all...] |
/external/apache-commons-math/src/main/java/org/apache/commons/math/ode/nonstiff/ |
DormandPrince853StepInterpolator.java | 44 /** Propagation weights, element 1. */ 49 /** Propagation weights, element 6. */ 52 /** Propagation weights, element 7. */ 55 /** Propagation weights, element 8. */ 58 /** Propagation weights, element 9. */ 61 /** Propagation weights, element 10. */ 64 /** Propagation weights, element 11. */ 67 /** Propagation weights, element 12. */ 73 /** Internal weights for stage 14, element 1. */ 78 /** Internal weights for stage 14, element 6. * [all...] |
/external/tensorflow/tensorflow/contrib/kernel_methods/python/ |
losses_test.py | 50 """An error is raised when weights have invalid shape.""" 54 weights = constant_op.constant([1.5, 0.2], shape=(2, 1, 1)) 56 _ = losses.sparse_multiclass_hinge_loss(labels, logits, weights) 67 """An error is raised when weights are None.""" 72 _ = losses.sparse_multiclass_hinge_loss(labels, logits, weights=None) 75 """Error raised when weights and labels have same ranks, different sizes.""" 79 weights = constant_op.constant([1.1, 2.0], shape=(2, 1)) 81 _ = losses.sparse_multiclass_hinge_loss(labels, logits, weights) 84 """Error raised when weights and labels have different ranks and sizes.""" 88 weights = constant_op.constant([1.1, 2.0, 2.8], shape=(3,) [all...] |
losses.py | 33 weights=1.0, 56 weights: Optional (python) scalar or `Tensor`. If a non-scalar `Tensor`, its 67 ValueError: If `logits`, `labels` or `weights` have invalid or inconsistent 91 # Check labels and weights have valid ranks and are consistent. 102 weights = ops.convert_to_tensor(weights) 103 weights_rank = weights.get_shape().ndims 106 'non-scalar weights should have rank 1 ([batch_size]) or 2 ' 110 weights = array_ops.reshape(weights, shape=[-1] [all...] |
/external/tensorflow/tensorflow/contrib/rnn/python/tools/ |
checkpoint_convert.py | 62 ('basic_rnn_cell/weights', 'basic_rnn_cell/kernel'), 65 ('gru_cell/weights', 'gru_cell/kernel'), 67 ('gru_cell/gates/weights', 'gru_cell/gates/kernel'), 69 ('gru_cell/candidate/weights', 'gru_cell/candidate/kernel'), 72 ('basic_lstm_cell/weights', 'basic_lstm_cell/kernel'), 75 ('lstm_cell/weights', 'lstm_cell/kernel'), 77 ('lstm_cell/projection/weights', 'lstm_cell/projection/kernel'), 80 ('output_projection_wrapper/weights', 'output_projection_wrapper/kernel'), 83 ('input_projection_wrapper/weights', 'input_projection_wrapper/kernel'), 88 ('lstm_block_wrapper/weights', 'lstm_block_wrapper/kernel') [all...] |
/external/tensorflow/tensorflow/contrib/seq2seq/python/ops/ |
loss.py | 32 weights, 53 weights: A Tensor of shape `[batch_size, sequence_length]` and dtype 54 float. `weights` constitutes the weighting of each prediction in the 55 sequence. When using `weights` as masking, set all valid timesteps to 1 75 dimensions or weights does not have 2 dimensions. 83 if len(weights.get_shape()) != 2: 84 raise ValueError("Weights must be a [batch_size x sequence_length] " 86 with ops.name_scope(name, "sequence_loss", [logits, targets, weights]): 95 crossent *= array_ops.reshape(weights, [-1]) 98 total_size = math_ops.reduce_sum(weights) [all...] |
/external/apache-commons-math/src/main/java/org/apache/commons/math/stat/descriptive/ |
AbstractUnivariateStatistic.java | 165 * and the weights are all non-negative, non-NaN, finite, and not all zero. 169 * positive length and the weights array contains legitimate values.</li> 172 * <li>the weights array is null</li> 173 * <li>the weights array does not have the same length as the values array</li> 174 * <li>the weights array contains one or more infinite values</li> 175 * <li>the weights array contains one or more NaN values</li> 176 * <li>the weights array contains negative values</li> 184 * @param weights the weights array 193 final double[] weights, [all...] |
/external/tensorflow/tensorflow/contrib/model_pruning/python/ |
pruning_test.py | 90 weights = variables.Variable( 91 random_ops.random_normal([width, height], stddev=1), name="weights") 92 masked_weights = pruning.apply_mask(weights, 95 weights_val = weights.eval() 101 weights = variables.Variable( 102 math_ops.linspace(1.0, 100.0, 100), name="weights") 103 masked_weights = pruning.apply_mask(weights) 115 def _blockMasking(self, hparams, weights, expected_mask): 126 _, new_mask = p._maybe_update_block_mask(weights, threshold) 127 # Check if the mask is the same size as the weights [all...] |
/external/tensorflow/tensorflow/contrib/learn/python/learn/estimators/ |
nonlinear_test.py | 49 classifier.get_variable_value("dnn/hiddenlayer_0/weights").shape, 52 classifier.get_variable_value("dnn/hiddenlayer_1/weights").shape, 55 classifier.get_variable_value("dnn/hiddenlayer_2/weights").shape, 58 classifier.get_variable_value("dnn/logits/weights").shape, (10, 3)) 75 weights = ([regressor.get_variable_value("dnn/hiddenlayer_0/weights")] + 76 [regressor.get_variable_value("dnn/hiddenlayer_1/weights")] + 77 [regressor.get_variable_value("dnn/hiddenlayer_2/weights")] + 78 [regressor.get_variable_value("dnn/logits/weights")]) 79 self.assertEqual(weights[0].shape, (13, 10) [all...] |
/external/apache-commons-math/src/main/java/org/apache/commons/math/stat/descriptive/moment/ |
Mean.java | 180 * described above is used here, with weights applied in computing both the original 185 * <li>the weights array is null</li> 186 * <li>the weights array does not have the same length as the values array</li> 187 * <li>the weights array contains one or more infinite values</li> 188 * <li>the weights array contains one or more NaN values</li> 189 * <li>the weights array contains negative values</li> 194 * @param weights the weights array 201 public double evaluate(final double[] values, final double[] weights, 203 if (test(values, weights, begin, length)) [all...] |
/external/tensorflow/tensorflow/python/estimator/canned/ |
head.py | 60 # * a scalar `Tensor` representing the example weights 63 'LossSpec', ['training_loss', 'unreduced_loss', 'weights', 167 * the scalar `Tensor` representing the example weights 276 """Fetches weights from features and checks that the shape matches logits. 278 Consider logits of shape [D0, D1, ... DN, logits_dimension]. Weights shape 282 * [D0, D1, ... DN]: In this case, weights is reshaped into 286 features: The features dict that contains weights. 289 allow_per_logit_weights: Boolean. Whether we allow weights along the logits 292 Validated and reshaped weights Tensor. 294 ValueError: If the weights `Tensor` cannot be cast into float [all...] |
/external/opencv/ml/src/ |
mlcnn.cpp | 297 // 3) Update weights by the gradient descent 635 CvMat* connect_mask, CvMat* weights ) 656 CV_CALL(layer->weights = cvCreateMat( n_output_planes, K*K+1, CV_32FC1 )); 659 if( weights ) 661 if( !ICV_IS_MAT_OF_TYPE( weights, CV_32FC1 ) ) 662 CV_ERROR( CV_StsBadSize, "Type of initial weights matrix must be CV_32FC1" ); 663 if( !CV_ARE_SIZES_EQ( weights, layer->weights ) ) 664 CV_ERROR( CV_StsBadSize, "Invalid size of initial weights matrix" ); 665 CV_CALL(cvCopy( weights, layer->weights )) [all...] |
/external/tensorflow/tensorflow/tools/api/golden/ |
tensorflow.keras.applications.inception_resnet_v2.pbtxt | 5 argspec: "args=[\'include_top\', \'weights\', \'input_tensor\', \'input_shape\', \'pooling\', \'classes\'], varargs=None, keywords=None, defaults=[\'True\', \'imagenet\', \'None\', \'None\', \'None\', \'1000\'], "
|
tensorflow.keras.applications.inception_v3.pbtxt | 5 argspec: "args=[\'include_top\', \'weights\', \'input_tensor\', \'input_shape\', \'pooling\', \'classes\'], varargs=None, keywords=None, defaults=[\'True\', \'imagenet\', \'None\', \'None\', \'None\', \'1000\'], "
|
tensorflow.keras.applications.mobilenet.pbtxt | 5 argspec: "args=[\'input_shape\', \'alpha\', \'depth_multiplier\', \'dropout\', \'include_top\', \'weights\', \'input_tensor\', \'pooling\', \'classes\'], varargs=None, keywords=None, defaults=[\'None\', \'1.0\', \'1\', \'0.001\', \'True\', \'imagenet\', \'None\', \'None\', \'1000\'], "
|
tensorflow.keras.applications.resnet50.pbtxt | 5 argspec: "args=[\'include_top\', \'weights\', \'input_tensor\', \'input_shape\', \'pooling\', \'classes\'], varargs=None, keywords=None, defaults=[\'True\', \'imagenet\', \'None\', \'None\', \'None\', \'1000\'], "
|