mirror of
https://github.com/zebrajr/tensorflow.git
synced 2025-12-07 12:20:24 +01:00
Initialize tensor in graph_properties_test, to avoid msan complaint.
PiperOrigin-RevId: 158169374
This commit is contained in:
parent
cabc5c35c2
commit
81cf61fdb6
|
|
@ -58,6 +58,7 @@ cc_test(
|
|||
"//tensorflow/cc:scope",
|
||||
"//tensorflow/core:framework",
|
||||
"//tensorflow/core:lib_proto_parsing",
|
||||
"//tensorflow/core:tensor_testutil",
|
||||
"//tensorflow/core:test",
|
||||
"//tensorflow/core:test_main",
|
||||
"//tensorflow/core/grappler:grappler_item",
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ limitations under the License.
|
|||
#include "tensorflow/cc/framework/scope.h"
|
||||
#include "tensorflow/cc/ops/standard_ops.h"
|
||||
#include "tensorflow/core/framework/node_def_builder.h"
|
||||
#include "tensorflow/core/framework/tensor_testutil.h"
|
||||
#include "tensorflow/core/grappler/clusters/single_machine.h"
|
||||
#include "tensorflow/core/grappler/grappler_item.h"
|
||||
#include "tensorflow/core/grappler/inputs/trivial_test_graph_input_yielder.h"
|
||||
|
|
@ -158,6 +159,7 @@ TEST_F(GraphPropertiesTest, Variables) {
|
|||
item.fetch.push_back("Var");
|
||||
|
||||
Tensor initial_val(DT_FLOAT, TensorShape({3, 7}));
|
||||
test::FillIota<float>(&initial_val, 0);
|
||||
TF_CHECK_OK(NodeDefBuilder("InitialVal", "Const")
|
||||
.Attr("dtype", DT_FLOAT)
|
||||
.Attr("value", initial_val)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user