基于Keras模型的Floydhub奇异产量预测

2024-09-27 20:18:25 发布

您现在位置:Python中文网/ 问答频道 /正文

我对某事很困惑。据我所知,当我通过Floydhub保存模型时,我的模型有很大的问题。我甚至不确定问题是否出在Floydhub身上,但我不明白会发生什么,所以我现在把责任推给他们。你知道吗

我正在尝试使用Keras运行一个RNN,它在单词级别生成文本。你知道吗

我使用的是this虚拟数据集(数据有一些问题,但对于这个错误报告来说,它应该可以工作)。如果您查看数据集,就会发现它有相当数量的<newline>字。你知道吗

当我在笔记本电脑上训练并保存模型时,我得到如下预测: <newline> <newline> jerry you the looks <newline> <newline> <newline> jerry you know <newline> <newline> bye the <newline> <newline> <newline> jerry flip a the the to <newline> <newline> jerry elaine you <newline> <newline> jerry elaine it <newline> <newline> jerry <newline> <newline> <newline> elaine have <newline> <newline> you jerry <newline> <newline> jerry her in <newline> <newline> <newline> i just <newline> <newline> <newline> <newline> <newline> he cometh back <newline> <newline> the you <newline> <newline> <newline> <newline> <newline> no of <newline> <newline> elaine <newline> <newline> <newline> <newline> elaine the me <newline> <newline> <newline>

然而,当我通过Floydhub(使用完全相同的代码-仅更改路径)进行训练并保存模型时,我得到如下结果: strengths dont turns hu hosting sittin avoided yayou sittin them tie sittin hu tie turns turns he biography them hereand its battery car afternoon tie into into tie sittin thanks alone turns turns brilliant minute quones shhhhh folks its car turns turns brilliant minute location decided turns turns brilliant biography them sometimes sitting thanks thanks thanks closes turns turns jer grape thursday jerrys jerrys national biography comin turns turns brilliant grape hu drawn minute paper hu probably hu mashed again turns turns jer grape office larry jerrys shop coin lie hescrazylook turns turns jer grape hu decided surprised ive meatloaf

我看不到<newline>,只是词汇表中随机选择的单词-没有清晰的模式,我看不出发生了什么。当然,Floydhub上保存的重量有问题。你知道吗

如果您转到my repository并检查trainingprediction之间的输出,应该很容易看到差异。你知道吗

在自述文件中,您将看到一些关于如何训练或运行预测的说明。再说一次-如果我在家里的电脑上训练和存钱,一切都能正常工作,所以我真的不知道Floydhub是怎么回事。我甚至不确定问题是否是Floydhub的问题,所以如果有人知道是什么导致了这个问题,或者我如何更有效地调试这个问题,请告诉我。你知道吗

我的代码可以看到here(零售价)你知道吗

我完全被难住了:困惑:

谢谢


Tags: the数据模型younewlineturnsjerryhu
1条回答
网友
1楼 · 发布于 2024-09-27 20:18:25

结果set()并没有返回稳定的顺序。为了解决这个问题,在映射和标记化开始之前,我在单词集上使用了sort()。你知道吗

它在我的笔记本电脑上工作而不是在Floydhub上工作的原因是set()在同一个环境中保持稳定的顺序,当然每次在Floydhub上运行它时,都是在不同的环境中运行的。你知道吗

相关问题 更多 >

    热门问题