Make Softplus benchmark more meaningful by using random inputs. The speed is highly input value dependent.
PiperOrigin-RevId: 263034339
This commit is contained in:
parent
090ad6034d
commit
41e3677707
@ -1277,7 +1277,7 @@ static void BM_SoftplusFloat(int iters, int batch_size, int rows, int cols,
|
||||
gtl::InlinedVector<TensorValue, 4> inputs;
|
||||
TensorShape shape1({batch_size, rows, cols, depth});
|
||||
Tensor input1(DT_FLOAT, shape1);
|
||||
test::FillIota<float>(&input1, 1.0);
|
||||
input1.flat<float>().setRandom();
|
||||
inputs.push_back({nullptr, &input1});
|
||||
|
||||
// Softplusing op.
|
||||
|
Loading…
Reference in New Issue
Block a user