到目前为止它真的很棒,但有人可以解释一下
newQ = model.predict(new_state.reshape(1,64),batch_size=1)
和
model.fit(X_train,y_train,batch_size=batchSize,nb_epoch=1,verbose=1)
意思?
就像参数bach_size,nb_epoch和verbose那样做什么?
我知道神经网络,所以解释这将是有帮助的.
您也可以向我发送一个链接,其中可以找到这些功能的文档.
解决方法 首先,令我惊讶的是你找不到 documentation,但我猜你在搜索时运气不好.文件陈述为model.fit
:
fit(self,x,y,batch_size=32,nb_epoch=10,verbose=1,callbacks=[],valIDation_split=0.0,valIDation_data=None,shuffle=True,class_weight=None,sample_weight=None)
batch_size
: integer. Number of samples per gradIEnt update.nb_epoch
: integer,the number of times to iterate over the training data arrays.verbose
: 0,1,or 2. Verbosity mode. 0 = silent,1 = verbose,2 = one log line per epoch.
model.predict情况下的batch_size参数只是每个预测步骤使用的样本数.因此,调用model.predict一次会消耗batch_size数量的数据样本.这有助于可以快速处理大型矩阵的设备(例如GPU).
总结以上是内存溢出为你收集整理的python – model.predict()和model.fit()做什么?全部内容,希望文章能够帮你解决python – model.predict()和model.fit()做什么?所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)