FixedUnigramCandidateSampler.Options
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
상속된 메서드
java.lang.Object 클래스에서 부울 | 같음 (개체 arg0) |
마지막 수업<?> | getClass () |
정수 | 해시 코드 () |
최종 무효 | 알림 () |
최종 무효 | 통지모두 () |
끈 | toString () |
최종 무효 | 대기 (long arg0, int arg1) |
최종 무효 | 기다리세요 (긴 arg0) |
최종 무효 | 기다리다 () |
공개 방법
매개변수
왜곡 | 왜곡은 유니그램 확률 분포를 왜곡하는 데 사용됩니다. 각 가중치는 내부 유니그램 분포에 추가되기 전에 먼저 왜곡의 거듭제곱으로 올라갑니다. 결과적으로 왜곡 = 1.0은 일반 유니그램 샘플링(단어 파일에 정의된 대로)을 제공하고 왜곡 = 0.0은 균일한 분포를 제공합니다. |
---|
매개변수
예약된 ID 수 | 선택적으로 사용자가 일부 예약된 ID를 [0, ..., num_reserved_ids) 범위에 추가할 수 있습니다. 한 가지 사용 사례는 특수한 알려지지 않은 단어 토큰이 ID 0으로 사용되는 것입니다. 이러한 ID의 샘플링 확률은 0입니다. |
---|
매개변수
샤드 수 | 병렬성을 통해 전체 계산 속도를 높이기 위해 샘플러를 사용하여 원래 범위의 하위 집합에서 샘플링할 수 있습니다. 이 매개변수('shard'와 함께)는 전체 계산에 사용되는 파티션 수를 나타냅니다. |
---|
매개변수
씨앗 | Seed 또는 Seed2가 0이 아닌 값으로 설정된 경우 난수 생성기는 지정된 시드에 의해 시드됩니다. 그렇지 않으면 무작위 시드에 의해 시드됩니다. |
---|
매개변수
시드2 | 시드 충돌을 피하기 위한 두 번째 시드입니다. |
---|
매개변수
사금파리 | 병렬성을 통해 전체 계산 속도를 높이기 위해 샘플러를 사용하여 원래 범위의 하위 집합에서 샘플링할 수 있습니다. 이 매개변수('num_shards'와 함께)는 분할이 사용될 때 샘플러 작업의 특정 파티션 번호를 나타냅니다. |
---|
매개변수
유니그램 | ID당 하나씩 순차적으로 표시되는 유니그램 수 또는 확률 목록입니다. vocab_file과 유니그램 중 정확히 하나만 이 작업에 전달되어야 합니다. |
---|
매개변수
어휘파일 | 이 파일의 각 유효한 줄(CSV 형식이어야 함)은 유효한 단어 ID에 해당합니다. ID는 num_reserved_ids부터 순차적으로 나열됩니다. 각 줄의 마지막 항목은 개수 또는 상대 확률에 해당하는 값이 될 것으로 예상됩니다. vocab_file과 유니그램 중 정확히 하나가 이 작업에 전달되어야 합니다. |
---|
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-07-26(UTC)
[null,null,["최종 업데이트: 2025-07-26(UTC)"],[],[],null,["# FixedUnigramCandidateSampler.Options\n\npublic static class **FixedUnigramCandidateSampler.Options** \nOptional attributes for [FixedUnigramCandidateSampler](/jvm/api_docs/java/org/tensorflow/op/nn/FixedUnigramCandidateSampler) \n\n### Public Methods\n\n|----------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [FixedUnigramCandidateSampler.Options](/jvm/api_docs/java/org/tensorflow/op/nn/FixedUnigramCandidateSampler.Options) | [distortion](/jvm/api_docs/java/org/tensorflow/op/nn/FixedUnigramCandidateSampler.Options#distortion(java.lang.Float))(Float distortion) |\n| [FixedUnigramCandidateSampler.Options](/jvm/api_docs/java/org/tensorflow/op/nn/FixedUnigramCandidateSampler.Options) | [numReservedIds](/jvm/api_docs/java/org/tensorflow/op/nn/FixedUnigramCandidateSampler.Options#numReservedIds(java.lang.Long))(Long numReservedIds) |\n| [FixedUnigramCandidateSampler.Options](/jvm/api_docs/java/org/tensorflow/op/nn/FixedUnigramCandidateSampler.Options) | [numShards](/jvm/api_docs/java/org/tensorflow/op/nn/FixedUnigramCandidateSampler.Options#numShards(java.lang.Long))(Long numShards) |\n| [FixedUnigramCandidateSampler.Options](/jvm/api_docs/java/org/tensorflow/op/nn/FixedUnigramCandidateSampler.Options) | [seed](/jvm/api_docs/java/org/tensorflow/op/nn/FixedUnigramCandidateSampler.Options#seed(java.lang.Long))(Long seed) |\n| [FixedUnigramCandidateSampler.Options](/jvm/api_docs/java/org/tensorflow/op/nn/FixedUnigramCandidateSampler.Options) | [seed2](/jvm/api_docs/java/org/tensorflow/op/nn/FixedUnigramCandidateSampler.Options#seed2(java.lang.Long))(Long seed2) |\n| [FixedUnigramCandidateSampler.Options](/jvm/api_docs/java/org/tensorflow/op/nn/FixedUnigramCandidateSampler.Options) | [shard](/jvm/api_docs/java/org/tensorflow/op/nn/FixedUnigramCandidateSampler.Options#shard(java.lang.Long))(Long shard) |\n| [FixedUnigramCandidateSampler.Options](/jvm/api_docs/java/org/tensorflow/op/nn/FixedUnigramCandidateSampler.Options) | [unigrams](/jvm/api_docs/java/org/tensorflow/op/nn/FixedUnigramCandidateSampler.Options#unigrams(java.util.List\u003cjava.lang.Float\u003e))(List\\\u003cFloat\\\u003e unigrams) |\n| [FixedUnigramCandidateSampler.Options](/jvm/api_docs/java/org/tensorflow/op/nn/FixedUnigramCandidateSampler.Options) | [vocabFile](/jvm/api_docs/java/org/tensorflow/op/nn/FixedUnigramCandidateSampler.Options#vocabFile(java.lang.String))(String vocabFile) |\n\n### Inherited Methods\n\nFrom class java.lang.Object \n\n|------------------|---------------------------|\n| boolean | equals(Object arg0) |\n| final Class\\\u003c?\\\u003e | getClass() |\n| int | hashCode() |\n| final void | notify() |\n| final void | notifyAll() |\n| String | toString() |\n| final void | wait(long arg0, int arg1) |\n| final void | wait(long arg0) |\n| final void | wait() |\n\nPublic Methods\n--------------\n\n#### public [FixedUnigramCandidateSampler.Options](/jvm/api_docs/java/org/tensorflow/op/nn/FixedUnigramCandidateSampler.Options)\n**distortion**\n(Float distortion)\n\n\u003cbr /\u003e\n\n##### Parameters\n\n| distortion | The distortion is used to skew the unigram probability distribution. Each weight is first raised to the distortion's power before adding to the internal unigram distribution. As a result, distortion = 1.0 gives regular unigram sampling (as defined by the vocab file), and distortion = 0.0 gives a uniform distribution. |\n|------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n\n#### public [FixedUnigramCandidateSampler.Options](/jvm/api_docs/java/org/tensorflow/op/nn/FixedUnigramCandidateSampler.Options)\n**numReservedIds**\n(Long numReservedIds)\n\n\u003cbr /\u003e\n\n##### Parameters\n\n| numReservedIds | Optionally some reserved IDs can be added in the range \\[0, ..., num_reserved_ids) by the users. One use case is that a special unknown word token is used as ID 0. These IDs will have a sampling probability of 0. |\n|----------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n\n#### public [FixedUnigramCandidateSampler.Options](/jvm/api_docs/java/org/tensorflow/op/nn/FixedUnigramCandidateSampler.Options)\n**numShards**\n(Long numShards)\n\n\u003cbr /\u003e\n\n##### Parameters\n\n| numShards | A sampler can be used to sample from a subset of the original range in order to speed up the whole computation through parallelism. This parameter (together with 'shard') indicates the number of partitions that are being used in the overall computation. |\n|-----------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n\n#### public [FixedUnigramCandidateSampler.Options](/jvm/api_docs/java/org/tensorflow/op/nn/FixedUnigramCandidateSampler.Options)\n**seed**\n(Long seed)\n\n\u003cbr /\u003e\n\n##### Parameters\n\n| seed | If either seed or seed2 are set to be non-zero, the random number generator is seeded by the given seed. Otherwise, it is seeded by a random seed. |\n|------|----------------------------------------------------------------------------------------------------------------------------------------------------|\n\n#### public [FixedUnigramCandidateSampler.Options](/jvm/api_docs/java/org/tensorflow/op/nn/FixedUnigramCandidateSampler.Options)\n**seed2**\n(Long seed2)\n\n\u003cbr /\u003e\n\n##### Parameters\n\n| seed2 | An second seed to avoid seed collision. |\n|-------|-----------------------------------------|\n\n#### public [FixedUnigramCandidateSampler.Options](/jvm/api_docs/java/org/tensorflow/op/nn/FixedUnigramCandidateSampler.Options)\n**shard**\n(Long shard)\n\n\u003cbr /\u003e\n\n##### Parameters\n\n| shard | A sampler can be used to sample from a subset of the original range in order to speed up the whole computation through parallelism. This parameter (together with 'num_shards') indicates the particular partition number of a sampler op, when partitioning is being used. |\n|-------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n\n#### public [FixedUnigramCandidateSampler.Options](/jvm/api_docs/java/org/tensorflow/op/nn/FixedUnigramCandidateSampler.Options)\n**unigrams**\n(List\\\u003cFloat\\\u003e unigrams)\n\n\u003cbr /\u003e\n\n##### Parameters\n\n| unigrams | A list of unigram counts or probabilities, one per ID in sequential order. Exactly one of vocab_file and unigrams should be passed to this op. |\n|----------|------------------------------------------------------------------------------------------------------------------------------------------------|\n\n#### public [FixedUnigramCandidateSampler.Options](/jvm/api_docs/java/org/tensorflow/op/nn/FixedUnigramCandidateSampler.Options)\n**vocabFile**\n(String vocabFile)\n\n\u003cbr /\u003e\n\n##### Parameters\n\n| vocabFile | Each valid line in this file (which should have a CSV-like format) corresponds to a valid word ID. IDs are in sequential order, starting from num_reserved_ids. The last entry in each line is expected to be a value corresponding to the count or relative probability. Exactly one of vocab_file and unigrams needs to be passed to this op. |\n|-----------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|"]]