mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Fixed compilation warnings generated by clang
This commit is contained in:
@@ -16,7 +16,7 @@ using Eigen::RowMajor;
|
||||
|
||||
static void test_tanh()
|
||||
{
|
||||
Tensor<float, 1> vec1({6});
|
||||
Tensor<float, 1> vec1(6);
|
||||
vec1.setRandom();
|
||||
|
||||
Tensor<float, 1> vec2 = vec1.tanh();
|
||||
@@ -28,7 +28,7 @@ static void test_tanh()
|
||||
|
||||
static void test_sigmoid()
|
||||
{
|
||||
Tensor<float, 1> vec1({6});
|
||||
Tensor<float, 1> vec1(6);
|
||||
vec1.setRandom();
|
||||
|
||||
Tensor<float, 1> vec2 = vec1.sigmoid();
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
|
||||
static void test_simple()
|
||||
{
|
||||
Tensor<float, 1, ColMajor> vec1({6});
|
||||
Tensor<float, 1, ColMajor, int> vec2({6});
|
||||
Tensor<float, 1, ColMajor> vec1(6);
|
||||
Tensor<float, 1, ColMajor, int> vec2(6);
|
||||
|
||||
vec1(0) = 4.0; vec2(0) = 0.0;
|
||||
vec1(1) = 8.0; vec2(1) = 1.0;
|
||||
|
||||
Reference in New Issue
Block a user