tvm
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
instance_norm.h
Go to the documentation of this file.
1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one
3  * or more contributor license agreements. See the NOTICE file
4  * distributed with this work for additional information
5  * regarding copyright ownership. The ASF licenses this file
6  * to you under the Apache License, Version 2.0 (the
7  * "License"); you may not use this file except in compliance
8  * with the License. You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing,
13  * software distributed under the License is distributed on an
14  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15  * KIND, either express or implied. See the License for the
16  * specific language governing permissions and limitations
17  * under the License.
18  */
19 
24 #ifndef TVM_TOPI_NN_INSTANCE_NORM_H_
25 #define TVM_TOPI_NN_INSTANCE_NORM_H_
26 
27 #include <tvm/te/operation.h>
28 #include <tvm/topi/nn/layer_norm.h>
29 #include <tvm/topi/tags.h>
30 
31 #include <string>
32 
33 namespace tvm {
34 namespace topi {
35 namespace nn {
36 
37 using namespace tvm::te;
38 
53 inline Tensor instance_norm(const Tensor& data, const Tensor& gamma, const Tensor& beta,
54  const Array<Integer>& axis, double epsilon,
55  std::string name = "T_instance_norm", std::string tag = kInjective) {
56  return layer_norm(data, gamma, beta, axis, epsilon, name, tag);
57 }
58 
59 } // namespace nn
60 } // namespace topi
61 } // namespace tvm
62 
63 #endif // TVM_TOPI_NN_INSTANCE_NORM_H_
Array, container representing a contiguous sequence of ObjectRefs.
Definition: array.h:289
Tensor structure representing a possible input, or intermediate computation result.
Definition: tensor.h:102
layer normalization op constructions
Tensor expression language DSL.
Definition: extracted_task.h:33
Tensor instance_norm(const Tensor &data, const Tensor &gamma, const Tensor &beta, const Array< Integer > &axis, double epsilon, std::string name="T_instance_norm", std::string tag=kInjective)
Instance normalization.
Definition: instance_norm.h:53
Tensor layer_norm(const Tensor &data, const Tensor &gamma, const Tensor &beta, const Array< Integer > &axis, double epsilon, std::string name="T_layer_norm", std::string tag=kInjective)
Layer normalization.
Definition: layer_norm.h:51
constexpr auto kInjective
Definition: tags.h:33
Performance counters for profiling via the PAPI library.
Definition: analyzer.h:36
Operation node can generate one or multiple Tensors.
External function interface to rocBLAS libraries.