질문이있다? TensorFlow 포럼 에서 커뮤니티와 연결

Returns a mask tensor representing the first N positions of each cell.

If `lengths` has shape `[d_1, d_2, ..., d_n]` the resulting tensor `mask` has dtype `dtype` and shape `[d_1, d_2, ..., d_n, maxlen]`, with

``````mask[i_1, i_2, ..., i_n, j] = (j < lengths[i_1, i_2, ..., i_n])
``````

#### Examples:

``````tf.sequence_mask([1, 3, 2], 5)  # [[True, False, False, False, False],
#  [True, True, True, False, False],
#  [True, True, False, False, False]]

tf.sequence_mask([[1, 3],[2,0]])  # [[[True, False, False],
#   [True, True, True]],
#  [[True, True, False],
#   [False, False, False]]]
``````

`lengths` integer tensor, all its values <= maxlen.
`maxlen` scalar integer tensor, size of last dimension of returned tensor. Default is the maximum value in `lengths`.
`dtype` output type of the resulting tensor.
`name` name of the op.

A mask tensor of shape `lengths.shape + (maxlen,)`, cast to specified dtype.

`ValueError` if `maxlen` is not a scalar.

[{ "type": "thumb-down", "id": "missingTheInformationINeed", "label":"필요한 정보가 없음" },{ "type": "thumb-down", "id": "tooComplicatedTooManySteps", "label":"너무 복잡함/단계 수가 너무 많음" },{ "type": "thumb-down", "id": "outOfDate", "label":"오래됨" },{ "type": "thumb-down", "id": "samplesCodeIssue", "label":"Samples / code issue" },{ "type": "thumb-down", "id": "otherDown", "label":"기타" }]
[{ "type": "thumb-up", "id": "easyToUnderstand", "label":"이해하기 쉬움" },{ "type": "thumb-up", "id": "solvedMyProblem", "label":"문제가 해결됨" },{ "type": "thumb-up", "id": "otherUp", "label":"기타" }]