RELU激励的全连接层预测输出竟然有负数?
Created by: junman
关键代码如下: 1.
query = fluid.layers.data(name = "Query", shape = [1], dtype="int64", lod_level=1)
query_fc = fluid.layers.fc(
input=query_softsign,
size=fc_dim,param_attr=fluid.param_attr.ParamAttr(name="fc1.w"),
bias_attr=fluid.param_attr.ParamAttr(name="fc1.b"),
act="relu",
name="fc1")
fluid.io.save_inference_model(save_dirname_epochid, ['Query'], [query_fc], exe)
results = exe.run(inference_program,
feed={feed_target_names[0]: tenser_lod},
fetch_list=fetch_targets)
输出结果: RELU输出怎么可能有负数呢?