Home
last modified time | relevance | path

Searched refs:ngram_width (Results 1 – 7 of 7) sorted by relevance

/external/tensorflow/tensorflow/core/kernels/
Dstring_ngrams_op.cc42 int get_pad_width(const int ngram_width) const { in get_pad_width()
46 return std::min(pad_width_ < 0 ? ngram_width - 1 : pad_width_, in get_pad_width()
47 ngram_width - 1); in get_pad_width()
50 int get_num_ngrams(const int length, const int ngram_width) const { in get_num_ngrams()
51 int pad_width = get_pad_width(ngram_width); in get_num_ngrams()
52 return std::max(0, ((length + 2 * pad_width) - ngram_width) + 1); in get_num_ngrams()
97 for (int ngram_width : ngram_widths_) in Compute() local
98 num_ngrams += get_num_ngrams(length, ngram_width); in Compute()
115 for (int ngram_width : ngram_widths_) { in Compute() local
118 int num_ngrams = get_num_ngrams(length, ngram_width); in Compute()
[all …]
Dstring_ngrams_op_test.cc39 void MakeOp(string separator, std::vector<int> ngram_width, string left_pad, in MakeOp() argument
43 .Attr("ngram_widths", ngram_width) in MakeOp()
/external/tensorflow/tensorflow/python/ops/ragged/
Dstring_ngrams_op_test.py40 data_tensor, ngram_width=3, separator=b"|")
49 data_tensor, ngram_width=(2, 3), separator=b"|")
59 data_tensor, ngram_width=(3, 2), separator=b"|")
69 data_tensor, ngram_width=[2, 3], separator=b"|")
79 data_tensor, ngram_width=[3, 2], separator=b"|")
89 data_tensor, ngram_width=3, separator=b"|", pad_values=(b"LP", b"RP"))
104 ngram_width=3,
121 ngram_width=5,
134 ngram_width=5,
148 ngram_width=(1, 5),
[all …]
Dragged_string_ops.py674 ngram_width, argument
781 return ngrams(rt, ngram_width, separator, pad_values, padding_width,
789 ngrams(data.values, ngram_width, separator, pad_values, padding_width,
800 if not isinstance(ngram_width, (list, tuple)):
801 ngram_widths = [ngram_width]
803 ngram_widths = ngram_width
807 ngram_width)
/external/tensorflow/tensorflow/tools/api/golden/v2/
Dtensorflow.strings.pbtxt29 …argspec: "args=[\'data\', \'ngram_width\', \'separator\', \'pad_values\', \'padding_width\', \'pre…
/external/tensorflow/tensorflow/tools/api/golden/v1/
Dtensorflow.strings.pbtxt29 …argspec: "args=[\'data\', \'ngram_width\', \'separator\', \'pad_values\', \'padding_width\', \'pre…
/external/tensorflow/tensorflow/python/keras/layers/preprocessing/
Dtext_vectorization.py546 inputs, ngram_width=self._ngrams, separator=" ")