相关疑难解决方法(0)

Keras:如果数据大小不能被batch_size整除怎么办?

我是Keras的新手,刚刚开始研究一些例子.我正在处理以下问题:我有4032个样本并且使用大约650个样本用于拟合或基本上训练状态,然后使用其余的来测试模型.问题是我不断收到以下错误:

Exception: In a stateful network, you should only pass inputs with a number of samples that can be divided by the batch size.
Run Code Online (Sandbox Code Playgroud)

我理解为什么我会收到此错误,我的问题是,如果我的数据大小不能被整除batch_size怎么办?我曾经和Deeplearning4j LSTM一起工作,没有必要处理这个问题.反正有没有解决这个问题?

谢谢

theano deep-learning keras

9
推荐指数
1
解决办法
2488
查看次数

标签 统计

deep-learning ×1

keras ×1

theano ×1