【问题标题】:Is there a way to get rid of this positional argument follows keyword argument?有没有办法摆脱这个位置参数跟随关键字参数?
【发布时间】:2020-12-08 01:53:01
【问题描述】:

所以我试图修复这个错误;但是,每次我尝试做某事时,我都会得到一个位置参数跟随一个关键字参数错误。

model.compile(loss='categorical_crossentropy',
              optimizer='adam',
              metrics=['accuracy'])
hist = model.fit(x=X_train, y=Y_train, batch_size=32, epochs=20, np.asarray(validation_split=0.2))

【问题讨论】:

  • 欢迎来到 Stack Overflow。你是什​​么意思,“每次我尝试做某事”?做什么?另外,请发布您的错误。

标签: python-3.x tensorflow conv-neural-network


【解决方案1】:

摆脱 np.asarray()

hist = model.fit(x=X_train, y=Y_train, batch_size=32, epochs=20, validation_split=0.2)

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-04-23
    • 1970-01-01
    • 2019-01-22
    • 1970-01-01
    • 2021-11-12
    • 1970-01-01
    相关资源
    最近更新 更多