{"id":17358628,"url":"https://github.com/prouast/ctc-beam-search-op","last_synced_at":"2026-04-21T03:31:04.899Z","repository":{"id":129543391,"uuid":"241761609","full_name":"prouast/ctc-beam-search-op","owner":"prouast","description":"Custom tensorflow op for ctc beam search that keeps track of best alignment for each beam","archived":false,"fork":false,"pushed_at":"2020-10-19T00:30:00.000Z","size":44,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-23T19:26:25.658Z","etag":null,"topics":["ctc","ctc-decode","tensorflow"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/prouast.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-02-20T00:57:02.000Z","updated_at":"2025-05-27T16:19:36.000Z","dependencies_parsed_at":"2023-03-28T00:06:12.372Z","dependency_job_id":null,"html_url":"https://github.com/prouast/ctc-beam-search-op","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":"tensorflow/custom-op","purl":"pkg:github/prouast/ctc-beam-search-op","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prouast%2Fctc-beam-search-op","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prouast%2Fctc-beam-search-op/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prouast%2Fctc-beam-search-op/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prouast%2Fctc-beam-search-op/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/prouast","download_url":"https://codeload.github.com/prouast/ctc-beam-search-op/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prouast%2Fctc-beam-search-op/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32075213,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-21T02:38:07.213Z","status":"ssl_error","status_checked_at":"2026-04-21T02:38:06.559Z","response_time":128,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ctc","ctc-decode","tensorflow"],"created_at":"2024-10-15T19:06:14.725Z","updated_at":"2026-04-21T03:31:04.883Z","avatar_url":"https://github.com/prouast.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TensorFlow CTC Beam Search Decoder that keeps track of best alignment for each beam\nThis is a custom version of the [`tf.nn.ctc_beam_search_decoder`](https://www.tensorflow.org/api_docs/python/tf/nn/ctc_beam_search_decoder).\nDuring the beam search, it keeps track of the most probable alignment for each beam, which includes blank labels.\nThis makes it possible to estimate at which point in the sequence a label might be situated.\n\nThis op was implemented for CPU only as a c++ kernel following the [guide](https://github.com/tensorflow/custom-op) provided by the TensorFlow authors.\nRefer to the guide for instructions on how to build and test the Op using Docker for Windows or Linux.\n\n### Args\n\n- `inputs`: 3-D `float` `Tensor`, size `[max_time, batch_size, num_classes]`. Input logits.\n- `sequence_length`: 1-D `int32` vector containing sequence lengths, having size `[batch_size]`.\n- `beam_width`: An int scalar \u003e= 1 (beam search beam width).\n- `top_paths`: An int scalar \u003e= 1, \u003c= beam_width (controls output size).\n- `merge_repeated`: A boolean indicating whether repeated sequence elements are merged in regular output.\n- `blank_index`: An int \u003c `num_classes` indicating which index in the inputs corresponds to blank labels.\n- `blank_label`: An int indicating the label that should be used for blanks in alignment.\n\n### Outputs\n\nA tuple `(decoded, alignment, log_probability)` where\n\n- `decoded`: A list of length `top_paths`, where `decoded[j]` is a `SparseTensor` containing the decoded outputs:\n  * `decoded[j].indices`: Indices matrix `[total_decoded_outputs[j], 2]`; The rows store: `[batch, time]`.\n  * `decoded[j].values`: Values vector, size `[total_decoded_outputs[j]]`. The vector stores the decoded classes for beam `j`.\n  * `decoded[j].shape`: Shape vector, size `(2)`. The shape values are: `[batch_size, max_decoded_length[j]]`.\n- `alignment`: A list of length `top_paths`, where `decoded[j]` is a `SparseTensor` containing the alignments of decoded outputs:\n  * `alignment[j].indices`: Indices matrix `[sequence_length[j], 2]`; The rows store: `[batch, time]`.\n  * `alignment[j].values`: Values vector, size `[sequence_length[j]]`. The vector stores the alignment for beam `j`.\n  * `alignment[j].shape`: Shape vector, size `(2)`. The shape values are: `[batch_size, sequence_length[j]]`.\n- `log_probability`: A float matrix `[batch_size, top_paths]` containing sequence log-probabilities.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprouast%2Fctc-beam-search-op","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprouast%2Fctc-beam-search-op","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprouast%2Fctc-beam-search-op/lists"}