【发布时间】:2017-06-16 07:52:30
【问题描述】:
我在我的 python 脚本中定义了一个函数 funA(x)。这个函数运行一个基于 theano 的神经网络。如果我调用它一次,代码运行良好。但是,如果我尝试在循环中使用不同的输入多次调用它,例如: 对于范围内的 i (4): 乐趣A(x[i]) 当i=0时,代码运行良好,但是当运行到i=1时,代码报错: ValueError: 无法计算测试值:输入 0 (x) of Op dot(x, W) 缺少默认值。
我已经安装了 pymc3 并尝试将 theano.config.compute_test_value 设置回 'ignore',如以下链接所示,但失败了 PyMC3 & Theano - Theano code that works stop working after pymc3 import
下面的另一个链接说,我可以尝试删除 .theano 目录,但我使用的是 windows 版本的 theano,我在哪里可以找到 .theano 目录? https://github.com/Theano/Theano/issues/1439
提前谢谢你
【问题讨论】: