• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* Copyright 2017 The TensorFlow Authors. All Rights Reserved.
2 
3 Licensed under the Apache License, Version 2.0 (the "License");
4 
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 #include "tensorflow/core/framework/common_shape_fns.h"
16 #include "tensorflow/core/framework/op.h"
17 #include "tensorflow/core/framework/shape_inference.h"
18 
19 namespace tensorflow {
20 
21 REGISTER_OP("SummaryWriter")
22     .Output("writer: resource")
23     .Attr("shared_name: string = ''")
24     .Attr("container: string = ''")
25     .SetShapeFn(shape_inference::ScalarShape);
26 
27 REGISTER_OP("CreateSummaryFileWriter")
28     .Input("writer: resource")
29     .Input("logdir: string")
30     .Input("max_queue: int32")
31     .Input("flush_millis: int32")
32     .Input("filename_suffix: string")
33     .SetShapeFn(shape_inference::NoOutputs);
34 
35 REGISTER_OP("CreateSummaryDbWriter")
36     .Input("writer: resource")
37     .Input("db_uri: string")
38     .Input("experiment_name: string")
39     .Input("run_name: string")
40     .Input("user_name: string")
41     .SetShapeFn(shape_inference::NoOutputs);
42 
43 REGISTER_OP("FlushSummaryWriter")
44     .Input("writer: resource")
45     .SetShapeFn(shape_inference::NoOutputs);
46 
47 REGISTER_OP("CloseSummaryWriter")
48     .Input("writer: resource")
49     .SetShapeFn(shape_inference::NoOutputs);
50 
51 REGISTER_OP("WriteSummary")
52     .Input("writer: resource")
53     .Input("step: int64")
54     .Input("tensor: T")
55     .Input("tag: string")
56     .Input("summary_metadata: string")
57     .Attr("T: type")
58     .SetShapeFn(shape_inference::NoOutputs);
59 
60 REGISTER_OP("ImportEvent")
61     .Input("writer: resource")
62     .Input("event: string")
63     .SetShapeFn(shape_inference::NoOutputs);
64 
65 REGISTER_OP("WriteScalarSummary")
66     .Input("writer: resource")
67     .Input("step: int64")
68     .Input("tag: string")
69     .Input("value: T")
70     .Attr("T: realnumbertype")
71     .SetShapeFn(shape_inference::NoOutputs);
72 
73 REGISTER_OP("WriteHistogramSummary")
74     .Input("writer: resource")
75     .Input("step: int64")
76     .Input("tag: string")
77     .Input("values: T")
78     .Attr("T: realnumbertype = DT_FLOAT")
79     .SetShapeFn(shape_inference::NoOutputs);
80 
81 REGISTER_OP("WriteImageSummary")
82     .Input("writer: resource")
83     .Input("step: int64")
84     .Input("tag: string")
85     .Input("tensor: T")
86     .Input("bad_color: uint8")
87     .Attr("max_images: int >= 1 = 3")
88     .Attr("T: {uint8, float, half} = DT_FLOAT")
89     .SetShapeFn(shape_inference::NoOutputs);
90 
91 REGISTER_OP("WriteAudioSummary")
92     .Input("writer: resource")
93     .Input("step: int64")
94     .Input("tag: string")
95     .Input("tensor: float")
96     .Input("sample_rate: float")
97     .Attr("max_outputs: int >= 1 = 3")
98     .SetShapeFn(shape_inference::NoOutputs);
99 
100 REGISTER_OP("WriteGraphSummary")
101     .Input("writer: resource")
102     .Input("step: int64")
103     .Input("tensor: string")
104     .SetShapeFn(shape_inference::NoOutputs);
105 
106 }  // namespace tensorflow
107