File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -209,14 +209,14 @@ class SkipgramWord2vecOp : public OpKernel {
209
209
vocab_size_ = static_cast <int32>(1 + ordered.size ());
210
210
Tensor word (DT_STRING, TensorShape ({vocab_size_}));
211
211
Tensor freq (DT_INT32, TensorShape ({vocab_size_}));
212
- word.flat <string >()(0 ) = " UNK" ;
212
+ word.flat <tstring >()(0 ) = " UNK" ;
213
213
static const int32 kUnkId = 0 ;
214
214
std::unordered_map<string, int32> word_id;
215
215
int64 total_counted = 0 ;
216
216
for (std::size_t i = 0 ; i < ordered.size (); ++i) {
217
217
const auto & w = ordered[i].first ;
218
218
auto id = i + 1 ;
219
- word.flat <string >()(id) = w;
219
+ word.flat <tstring >()(id) = w;
220
220
auto word_count = ordered[i].second ;
221
221
freq.flat <int32>()(id) = word_count;
222
222
total_counted += word_count;
You can’t perform that action at this time.
0 commit comments