1 | /* Copyright 2015 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("Skipgram" ) |
22 | .Deprecated(19, |
23 | "Moving word2vec into tensorflow_models/tutorials and " |
24 | "deprecating its ops here as a result" ) |
25 | .Output("vocab_word: string" ) |
26 | .Output("vocab_freq: int32" ) |
27 | .Output("words_per_epoch: int64" ) |
28 | .Output("current_epoch: int32" ) |
29 | .Output("total_words_processed: int64" ) |
30 | .Output("examples: int32" ) |
31 | .Output("labels: int32" ) |
32 | .SetIsStateful() |
33 | .Attr("filename: string" ) |
34 | .Attr("batch_size: int" ) |
35 | .Attr("window_size: int = 5" ) |
36 | .Attr("min_count: int = 5" ) |
37 | .Attr("subsample: float = 1e-3" ) |
38 | .SetShapeFn(shape_inference::UnknownShape); |
39 | |
40 | REGISTER_OP("NegTrain" ) |
41 | .Deprecated(19, |
42 | "Moving word2vec into tensorflow_models/tutorials and " |
43 | "deprecating its ops here as a result" ) |
44 | .Input("w_in: Ref(float)" ) |
45 | .Input("w_out: Ref(float)" ) |
46 | .Input("examples: int32" ) |
47 | .Input("labels: int32" ) |
48 | .Input("lr: float" ) |
49 | .SetIsStateful() |
50 | .Attr("vocab_count: list(int)" ) |
51 | .Attr("num_negative_samples: int" ) |
52 | .SetShapeFn(shape_inference::UnknownShape); |
53 | |
54 | } // end namespace tensorflow |
55 | |