1 /* Copyright 2021 The TensorFlow Authors. All Rights Reserved. 2 3 Licensed under the Apache License, Version 2.0 (the "License"); 4 you may not use this file except in compliance with the License. 5 You may obtain a copy of the License at 6 7 http://www.apache.org/licenses/LICENSE-2.0 8 9 Unless required by applicable law or agreed to in writing, software 10 distributed under the License is distributed on an "AS IS" BASIS, 11 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 See the License for the specific language governing permissions and 13 limitations under the License. 14 ==============================================================================*/ 15 16 // This file is MACHINE GENERATED! Do not edit. 17 18 #ifndef TENSORFLOW_C_EXPERIMENTAL_OPS_ARRAY_OPS_H_ 19 #define TENSORFLOW_C_EXPERIMENTAL_OPS_ARRAY_OPS_H_ 20 21 #include "tensorflow/c/eager/abstract_context.h" 22 #include "tensorflow/c/eager/abstract_tensor_handle.h" 23 24 namespace tensorflow { 25 namespace ops { 26 27 // Return a tensor with the same shape and contents as the input tensor or 28 // value. 29 Status Identity(AbstractContext* ctx, AbstractTensorHandle* const input, 30 AbstractTensorHandle** output, const char* name = nullptr, 31 const char* raw_device_name = nullptr); 32 33 // Returns a list of tensors with the same shapes and contents as the input 34 Status IdentityN(AbstractContext* ctx, 35 absl::Span<AbstractTensorHandle* const> input, 36 absl::Span<AbstractTensorHandle*> output, 37 const char* name = nullptr, 38 const char* raw_device_name = nullptr); 39 40 // Returns a tensor of zeros with the same shape and type as x. 41 Status ZerosLike(AbstractContext* ctx, AbstractTensorHandle* const x, 42 AbstractTensorHandle** y, const char* name = nullptr, 43 const char* raw_device_name = nullptr); 44 45 // Returns the shape of a tensor. 46 Status Shape(AbstractContext* ctx, AbstractTensorHandle* const input, 47 AbstractTensorHandle** output, DataType out_type = DT_INT32, 48 const char* name = nullptr, const char* raw_device_name = nullptr); 49 50 // Inserts a dimension of 1 into a tensor's shape. 51 Status ExpandDims(AbstractContext* ctx, AbstractTensorHandle* const input, 52 AbstractTensorHandle* const dim, 53 AbstractTensorHandle** output, const char* name = nullptr, 54 const char* raw_device_name = nullptr); 55 56 // Returns a tensor of ones with the same shape and type as x. 57 Status OnesLike(AbstractContext* ctx, AbstractTensorHandle* const x, 58 AbstractTensorHandle** y, const char* name = nullptr, 59 const char* raw_device_name = nullptr); 60 61 } // namespace ops 62 } // namespace tensorflow 63 64 #endif // TENSORFLOW_C_EXPERIMENTAL_OPS_ARRAY_OPS_H_ 65