我正在阅读一个关于喀拉斯的教程,并来到了一个跨这个班,这是继承了另一个班。
class LearningRateDecay:
def plot(self, epochs, title="Learning Rate Schedule"):
lrs = [self(i) for i in epochs]
plt.style.use("ggplot")
plt.figure()
plt.plot(epochs, lrs)
plt.title(title)
plt.xlabel("Epoch #")
plt.ylabel("Learning Rate")
其中的时代定义如下:
N = 100
epochs = np.arange(0, N)
传递给如下绘图函数:
a = LearningRateDecay
a.plot(epochs,"Learning Rate Schedule")
我不明白什么是
自我(一)
什么意思?这是关于访问自我元素还是其他东西?
非常感谢您的帮助。
谢谢你