在使用keras函数方法编程的时候遇到了两个问题
keras的函数式方法应该是keras.activations.relu(x, alpha=0.0, max_value=None, threshold=0.0)
但是行不通会报错:module object is not callable
但是采用下图的方法偶尔也会报错 tensor object has no attribute "keras history"
最后还是采用了下图的方法 from keras.layers import Activation
参考连接: https://github.com/keras-team/keras/issues/7362

网友评论