tensor_slice_set_test.cc
imports tensorflow/core/platform/logging.himports tensorflow/core/platform/test.h
SHA-256ffac839beb932db9f88800503278e496f523b580872208fe4db65d35cbd17cf2
MaleculeMd₂(In₃Pa)
Evidence
1/* Copyright 2015 The TensorFlow Authors. All Rights Reserved.
2
3Licensed under the Apache License, Version 2.0 (the "License");
4you may not use this file except in compliance with the License.
5You may obtain a copy of the License at
6
7 http://www.apache.org/licenses/LICENSE-2.0
8
9Unless required by applicable law or agreed to in writing, software
10distributed under the License is …
11:42… IND, either express or implied.
12See the License for the specific language governing permissions and
13limitations under the License.
14==============================================================================*/
15
16#include "tensorflow/core/util/tensor_slice_set.h"
17
18#include <utility>
19#include <vector>
20
21#include "tensorflow/core/lib/core/status.h"
22#include "tensorflow/core/platform/logging.h"
23#include "tensorflow/core/platform/test.h"
24#include "tensorflow/core/platform/test_benchmark.h"
25
26namespace tensorflow {
27
28namespace checkpoint {
29
30namespace {
31
32// A simple test: we have a 2-d tensor of shape 4 X 5 that looks like this:
33//
34// 0 1 2 3 4
35// 5 6 7 8 9
36// 10 11 12 13 14
37// 15 …
88:3… std::vector<std::pair<TensorSlice, std::string>> results;
89 EXPECT_TRUE(tss.QueryMeta(s, &results));
90 EXPECT_EQ(1, results.size());
91 EXPECT_EQ("0,2:-", results[0].first.DebugString());
92 EXPECT_EQ("slice_1", results[0].second);
93 }
94
95 …