fastNLP.core.const

fastNLP包当中的field命名均符合一定的规范,该规范由fastNLP.Const类进行定义。

class fastNLP.core.const.Const[源代码]

别名 fastNLP.Const fastNLP.core.const.Const

fastNLP中field命名常量。

具体列表:

INPUT       模型的序列输入      words(具有多列words时,依次使用words1, words2, )
CHAR_INPUT  模型character输入  chars(具有多列chars时,依次使用chars1, chars2)
INPUT_LEN   序列长度           seq_len(具有多列seq_len时,依次使用seq_len1,seq_len2)
OUTPUT      模型输出           pred(具有多列pred时,依次使用pred1, pred2)
TARGET      真实目标           target(具有多列target时,依次使用target1,target2)
LOSS        损失函数           loss (具有多列loss时,依次使用loss1,loss2)
RAW_WORD    原文的词           raw_words  (具有多列raw_words时,依次使用raw_words1, raw_words2)
RAW_CHAR    原文的字           raw_chars  (具有多列raw_chars时,依次使用raw_chars1, raw_chars2)
CHAR_INPUT = 'chars'
static CHAR_INPUTS(i)[源代码]

得到第 i 个 CHAR_INPUT 的命名

INPUT = 'words'
static INPUTS(i)[源代码]

得到第 i 个 INPUT 的命名

INPUT_LEN = 'seq_len'
static INPUT_LENS(i)[源代码]

得到第 i 个 INPUT_LEN 的命名

LOSS = 'loss'
static LOSSES(i)[源代码]

得到第 i 个 LOSS 的命名

OUTPUT = 'pred'
static OUTPUTS(i)[源代码]

得到第 i 个 OUTPUT 的命名

RAW_CHAR = 'raw_chars'
static RAW_CHARS(i)[源代码]

得到第 i 个 RAW_CHARS 的命名

RAW_WORD = 'raw_words'
static RAW_WORDS(i)[源代码]

得到第 i 个 RAW_WORDS 的命名

TARGET = 'target'
static TARGETS(i)[源代码]

得到第 i 个 TARGET 的命名

__init__

Initialize self. See help(type(self)) for accurate signature.