Also getting this when trying to sample:
---------------------------------------------------------------------------
UnusedInputError Traceback (most recent call last)
in
----> 1 sample_proba1 = theano.function([x1, n1], _sample_proba_nn1)
2 # sample_proba2 = theano.function([x2, n2], _sample_proba_nn2)
~/anaconda3/envs/progprob3/lib/python3.7/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/progprob3/lib/python3.7/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)
484 accept_inplace=accept_inplace, name=name,
485 profile=profile, on_unused_input=on_unused_input,
–> 486 output_keys=output_keys)
487
488
~/anaconda3/envs/progprob3/lib/python3.7/site-packages/theano/compile/function_module.py in orig_function(inputs, outputs, mode, accept_inplace, name, profile, on_unused_input, output_keys)
1837 on_unused_input=on_unused_input,
1838 output_keys=output_keys,
-> 1839 name=name)
1840 with theano.change_flags(compute_test_value=“off”):
1841 fn = m.create(defaults)
~/anaconda3/envs/progprob3/lib/python3.7/site-packages/theano/compile/function_module.py in init(self, inputs, outputs, mode, accept_inplace, function_builder, profile, on_unused_input, fgraph, output_keys, name)
1472
1473 # Check if some input variables are unused
-> 1474 self._check_unused_inputs(inputs, outputs, on_unused_input)
1475
1476 # Make a list of (SymbolicInput|SymblicInputKits, indices,
~/anaconda3/envs/progprob3/lib/python3.7/site-packages/theano/compile/function_module.py in _check_unused_inputs(self, inputs, outputs, on_unused_input)
1625 elif on_unused_input == ‘raise’:
1626 raise UnusedInputError(msg % (inputs.index(i),
-> 1627 i.variable, err_msg))
1628 else:
1629 raise ValueError("Invalid value for keyword "
UnusedInputError: theano.function was asked to create a function computing outputs given certain inputs, but the provided input variable at index 0 is not part of the computational graph needed to compute the outputs: X.
To make this error into a warning, you can pass the parameter on_unused_input=‘warn’ to theano.function. To disable it completely, use on_unused_input=‘ignore’.
sample_nn1 = sample_proba1(X_test1, 15000)
sample_nn2 = sample_proba2(X_test2, 15000)