Skip to content

Commit 930672d

Browse files
author
Prikhodko Stanislav
committed
rm unnecessary comments
1 parent 2f49fae commit 930672d

File tree

2 files changed

+0
-18
lines changed

2 files changed

+0
-18
lines changed

ctcdecode/src/binding.cpp

-12
Original file line numberDiff line numberDiff line change
@@ -204,20 +204,10 @@ std::pair<torch::Tensor, torch::Tensor> beam_decode_with_given_state(at::Tensor
204204
torch::Tensor output_tokens_tensor = torch::randint(1, {batch_results.size(), max_result_size, max_output_tokens_size});
205205
torch::Tensor output_timesteps_tensor = torch::randint(1, {batch_results.size(), max_result_size, max_output_tokens_size});
206206

207-
// cout << batch_results.size() << endl;
208-
// cout << max_result_size << endl;
209-
// cout << max_output_tokens_size << endl;
210207

211208
auto scores_accessor = th_scores.accessor<float, 2>();
212209
auto out_length_accessor = th_out_length.accessor<int, 2>();
213210

214-
// for (size_t i = 0; i < states.size(); ++i) {
215-
// if (is_eos_s[i] && states[i] != nullptr) {
216-
// delete static_cast<DecoderState *>(states[i]);
217-
// states[i] = nullptr;
218-
// }
219-
// }
220-
221211

222212
for (int b = 0; b < batch_results.size(); ++b){
223213
std::vector<std::pair<double, Output>> results = batch_results[b];
@@ -235,8 +225,6 @@ std::pair<torch::Tensor, torch::Tensor> beam_decode_with_given_state(at::Tensor
235225
}
236226
}
237227

238-
// torch::Tensor int_tensor = tensor.to(torch::kInt32);
239-
240228
return {output_tokens_tensor, output_timesteps_tensor};
241229
}
242230

ctcdecode/src/path_trie.cpp

-6
Original file line numberDiff line numberDiff line change
@@ -158,12 +158,6 @@ void PathTrie::remove() {
158158
parent->remove();
159159
}
160160

161-
// TODO: memory leak without this
162-
// but this fix cause Segmentation fault in some cases
163-
// if (dictionary_ != nullptr) {
164-
// delete dictionary_;
165-
// }
166-
167161
delete this;
168162
}
169163
}

0 commit comments

Comments
 (0)