• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* Copyright 2016 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 #include "tensorflow/core/framework/common_shape_fns.h"
17 #include "tensorflow/core/framework/op.h"
18 
19 namespace tensorflow {
20 
21 REGISTER_OP("ThrowAway1")
22     .Input("ret: int32")
23     .Input("unique_name: float")
24     .Input("for: int32")
25     .Attr("scope: int")
26     .Attr("builder: int = 1")
27     .Attr("while: int")
28     .SetShapeFn(shape_inference::UnknownShape)
29     .Doc(R"doc(
30 Op to test keywords and reserved words in input and attr names.
31 
32 ret: Return value.
33 for: Keyword as name for input.
34 while: Keyword as name for attr.
35 )doc");
36 
37 REGISTER_OP("ThrowAway2")
38     .Attr("scope: int = 2")
39     .Attr("throw_away2: int = 2")
40     .Attr("attrs: int = 4")
41     .Attr("node: int = 4")
42     .SetShapeFn(shape_inference::UnknownShape);
43 
44 REGISTER_OP("ThrowAway3")
45     .Output("node: int32")
46     .SetShapeFn(shape_inference::UnknownShape);
47 
48 REGISTER_OP("ThrowAway4")
49     .Input("node: int32")
50     .SetShapeFn(shape_inference::UnknownShape);
51 
52 REGISTER_OP("ThrowAway5")
53     .Output("foo: int32")
54     .Attr("node: int = 4")
55     .SetShapeFn(shape_inference::UnknownShape);
56 
57 }  // namespace tensorflow
58