在做神经网络建模时,考虑超参数优化后遇到这个问题。
超参数调节后的数据格式为Integer,而建模过程中的数据是int
n_neurons = Integer(low=1, high=5, name='n_neurons')
TypeError: '<' not supported between instances of 'Integer' and 'int'
将所有数据格式都该为int
python如何将Integer转换成int形式?
Integer i;
int k=i.intValue();