• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_NN_OPS_H_
19 #define TENSORFLOW_C_EXPERIMENTAL_OPS_NN_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 // Computes softmax cross entropy cost and gradients to backpropagate.
28 Status SparseSoftmaxCrossEntropyWithLogits(
29     AbstractContext* ctx, AbstractTensorHandle* const features,
30     AbstractTensorHandle* const labels, AbstractTensorHandle** loss,
31     AbstractTensorHandle** backprop, const char* name = nullptr,
32     const char* raw_device_name = nullptr);
33 
34 // Computes rectified linear gradients for a Relu operation.
35 Status ReluGrad(AbstractContext* ctx, AbstractTensorHandle* const gradients,
36                 AbstractTensorHandle* const features,
37                 AbstractTensorHandle** backprops, const char* name = nullptr,
38                 const char* raw_device_name = nullptr);
39 
40 // Computes rectified linear: `max(features, 0)`.
41 Status Relu(AbstractContext* ctx, AbstractTensorHandle* const features,
42             AbstractTensorHandle** activations, const char* name = nullptr,
43             const char* raw_device_name = nullptr);
44 
45 // Adds `bias` to `value`.
46 Status BiasAdd(AbstractContext* ctx, AbstractTensorHandle* const value,
47                AbstractTensorHandle* const bias, AbstractTensorHandle** output,
48                const char* data_format = "NHWC", const char* name = nullptr,
49                const char* raw_device_name = nullptr);
50 
51 // The backward operation for "BiasAdd" on the "bias" tensor.
52 Status BiasAddGrad(AbstractContext* ctx,
53                    AbstractTensorHandle* const out_backprop,
54                    AbstractTensorHandle** output,
55                    const char* data_format = "NHWC", const char* name = nullptr,
56                    const char* raw_device_name = nullptr);
57 
58 }  // namespace ops
59 }  // namespace tensorflow
60 
61 #endif  // TENSORFLOW_C_EXPERIMENTAL_OPS_NN_OPS_H_
62