Dav*_*eAl 5 python batch-processing deep-learning keras tensorflow
我目前正在尝试在Keras中实现多输入模型。输入包含多个批次,每个批次包含不同的样本,但是出现“不同样本”错误。我的实现如下所示:
该模型站点如下所示:
for s in range(NUM_STREAMS):
inp.append(Input(shape=(16,8)))
...
Run Code Online (Sandbox Code Playgroud)
发生错误的站点:
history = model.train_on_batch(
x=[x for x in X_batch],
y=[y for y in y_batch]
)
Run Code Online (Sandbox Code Playgroud)
我得到的错误是:
ValueError: All input arrays (x) should have the same number of
samples. Got array shapes: [(6, 16, 8), (7, 16, 8), (6, 16, 8), (6, 16, 8)]
Run Code Online (Sandbox Code Playgroud)
抽象模型架构如下所示:
归档时间: |
|
查看次数: |
1085 次 |
最近记录: |