__init __(self)用于def __init __(self),我想了解为什么

时间:2019-02-18 08:16:53

标签: python

我最近在github上遇到了有关AI的教程,其中有一个关于def __init__(self)的代码实现,在此函数中,我们声明了另一个函数,例如__init__(self)

这是代码的链接。来源:

https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/21_Machine_Translation.ipynb

def __init__(self, texts, padding,
                 reverse=False, num_words=None):
    Tokenizer.__init__(self, num_words=num_words) // I dont understand this part

0 个答案:

没有答案