我收到此错误:
~/anaconda3/envs/theano_p36/lib/python3.6/site-
packages/theano/compile/function.py in function(inputs, outputs,
mode, updates, givens, no_default_updates, accept_inplace, name,
rebuild_strict, allow_input_downcast, profile, on_unused_input)
315 on_unused_input=on_unused_input,
316 profile=profile,
--> 317 output_keys=output_keys)
318 return fn
~/anaconda3/envs/theano_p36/lib/python3.6/site-
packages/theano/compile/pfunc.py in pfunc(params, outputs, mode,
updates, givens, no_default_updates, accept_inplace, name,
rebuild_strict, allow_input_downcast, profile, on_unused_input,
output_keys)
395 # transform params into theano.compile.In objects.
396 inputs = [_pfunc_param_to_in(p,
allow_downcast=allow_input_downcast)
--> 397 for p in params]
398
399 # Check if some variable is present more than once in
inputs
~/anaconda3/envs/theano_p36/lib/python3.6/site-
packages/theano/compile/pfunc.py in <listcomp>(.0)
395 # transform params into theano.compile.In objects.
396 inputs = [_pfunc_param_to_in(p,
allow_downcast=allow_input_downcast)
--> 397 for p in params]
398
399 # Check if some variable is present more than once in
inputs
~/anaconda3/envs/theano_p36/lib/python3.6/site-
packages/theano/compile/pfunc.py in _pfunc_param_to_in(param,
strict, allow_downcast)
494 elif isinstance(param, In):
495 return param
--> 496 raise TypeError('Unknown parameter type: %s' %
type(param))
497
498
TypeError: Unknown parameter type: <class 'int'>
这是相关代码:
self.dF = function([z, K.learning_phase()], grad(Q, wrt=z), allow_input_downcast=True)
我不知道问题出在哪里,我将不胜感激。我将keras_learning_phase设置为0。