《Pytorch实用教程》(第二版)无论是零基础入门,还是CV、NLP、LLM项目应用,或是进阶工程化部署落地,在这里都有。相信在本书的帮助下,读者将能够轻松掌握 PyTorch 的使用,成为一名优秀的深度学习工程师。
This report summarizes scanner evidence for TingsongYu/PyTorch-Tutorial-2nd, a Jupyter Notebook project with 4,625 GitHub stars. SynthScan examined 206,044 lines of code across 483 source files, recording 1175 pattern matches distributed across 21 syntactic categories. The legacy adjusted pattern signal is 7.2 (Moderate pattern signal); it is not an authorship estimate.
Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.
Use each vector to guide manual verification of the underlying findings.
Can maintainers explain intent, assumptions, and trade-offs? 757 finding(s).
Are imports declared and package/API names verified? 218 finding(s).
Are wrappers, guards, and repeated structures necessary? 303 finding(s).
Which changes need focused human review? 1175 finding(s).
This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.
Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.
This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.
The scanner identified 1175 distinct pattern matches across 21 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | code/chapter-7/my_utils.py | 0 | @file name : 03_utils.py @author : tingsongyu https://github.com/tingsongyu @date : 2022-06-14 @brief : 训练所需的函数 | STRING |
| HIGH | code/chapter-9/b_seq2seq/utils/my_utils.py | 0 | @file name : 03_utils.py @author : tingsongyu https://github.com/tingsongyu @date : 2022-06-14 @brief : 训练所需的函数 | STRING |
| HIGH | code/chapter-9/c_transformer/utils/my_utils.py | 0 | @file name : 03_utils.py @author : tingsongyu https://github.com/tingsongyu @date : 2022-06-14 @brief : 训练所需的函数 | STRING |
| HIGH | code/chapter-8/02_segmentation/utils/utils.py | 0 | @file name : 03_utils.py @author : tingsongyu https://github.com/tingsongyu @date : 2022-06-14 @brief : 训练所需的函数 | STRING |
| HIGH | code/chapter-8/01_classification/utils/my_utils.py | 0 | @file name : 03_utils.py @author : tingsongyu https://github.com/tingsongyu @date : 2022-06-14 @brief : 训练所需的函数 | STRING |
| HIGH | code/chapter-6/my_utils.py | 0 | @file name : 03_utils.py @author : tingsongyu https://github.com/tingsongyu @date : 2022-06-14 @brief : 训练所需的函数 | STRING |
| HIGH | code/chapter-7/my_utils.py | 0 | 混淆矩阵绘制并保存图片 :param confusion_mat: nd.array :param classes: list or tuple, 类别名称 :param set_name: str, 数据集名称 train or vali | STRING |
| HIGH | code/chapter-9/a_rnn_lstm/utils/my_utils.py | 0 | 混淆矩阵绘制并保存图片 :param confusion_mat: nd.array :param classes: list or tuple, 类别名称 :param set_name: str, 数据集名称 train or vali | STRING |
| HIGH | code/chapter-9/b_seq2seq/utils/my_utils.py | 0 | 混淆矩阵绘制并保存图片 :param confusion_mat: nd.array :param classes: list or tuple, 类别名称 :param set_name: str, 数据集名称 train or vali | STRING |
| HIGH | code/chapter-9/c_transformer/utils/my_utils.py | 0 | 混淆矩阵绘制并保存图片 :param confusion_mat: nd.array :param classes: list or tuple, 类别名称 :param set_name: str, 数据集名称 train or vali | STRING |
| HIGH | code/chapter-8/01_classification/utils/my_utils.py | 0 | 混淆矩阵绘制并保存图片 :param confusion_mat: nd.array :param classes: list or tuple, 类别名称 :param set_name: str, 数据集名称 train or vali | STRING |
| HIGH | code/chapter-6/my_utils.py | 0 | 混淆矩阵绘制并保存图片 :param confusion_mat: nd.array :param classes: list or tuple, 类别名称 :param set_name: str, 数据集名称 train or vali | STRING |
| HIGH | code/chapter-7/my_utils.py | 0 | compute the average over a list of tensors with the same size. | STRING |
| HIGH | code/chapter-9/a_rnn_lstm/utils/my_utils.py | 0 | compute the average over a list of tensors with the same size. | STRING |
| HIGH | code/chapter-8/01_classification/utils/my_utils.py | 0 | compute the average over a list of tensors with the same size. | STRING |
| HIGH | code/chapter-7/my_utils.py | 0 | 在out_dir文件夹下以当前时间命名,创建日志文件夹,并创建logger用于记录信息 :param out_dir: str :return: | STRING |
| HIGH | code/chapter-9/a_rnn_lstm/utils/my_utils.py | 0 | 在out_dir文件夹下以当前时间命名,创建日志文件夹,并创建logger用于记录信息 :param out_dir: str :return: | STRING |
| HIGH | code/chapter-9/b_seq2seq/utils/my_utils.py | 0 | 在out_dir文件夹下以当前时间命名,创建日志文件夹,并创建logger用于记录信息 :param out_dir: str :return: | STRING |
| HIGH | code/chapter-9/c_transformer/utils/my_utils.py | 0 | 在out_dir文件夹下以当前时间命名,创建日志文件夹,并创建logger用于记录信息 :param out_dir: str :return: | STRING |
| HIGH | code/chapter-8/02_segmentation/utils/utils.py | 0 | 在out_dir文件夹下以当前时间命名,创建日志文件夹,并创建logger用于记录信息 :param out_dir: str :return: | STRING |
| HIGH | code/chapter-8/01_classification/utils/my_utils.py | 0 | 在out_dir文件夹下以当前时间命名,创建日志文件夹,并创建logger用于记录信息 :param out_dir: str :return: | STRING |
| HIGH | code/chapter-7/my_utils.py | 0 | computes and stores the average and current value hacked from https://github.com/rwightman/pytorch-image-models/blob/mas | STRING |
| HIGH | code/chapter-9/a_rnn_lstm/utils/my_utils.py | 0 | computes and stores the average and current value hacked from https://github.com/rwightman/pytorch-image-models/blob/mas | STRING |
| HIGH | code/chapter-9/b_seq2seq/utils/my_utils.py | 0 | computes and stores the average and current value hacked from https://github.com/rwightman/pytorch-image-models/blob/mas | STRING |
| HIGH | code/chapter-9/c_transformer/utils/my_utils.py | 0 | computes and stores the average and current value hacked from https://github.com/rwightman/pytorch-image-models/blob/mas | STRING |
| HIGH | code/chapter-8/02_segmentation/utils/utils.py | 0 | computes and stores the average and current value hacked from https://github.com/rwightman/pytorch-image-models/blob/mas | STRING |
| HIGH | code/chapter-8/01_classification/utils/my_utils.py | 0 | computes and stores the average and current value hacked from https://github.com/rwightman/pytorch-image-models/blob/mas | STRING |
| HIGH | code/chapter-7/my_utils.py | 0 | computes the accuracy over the k top predictions for the specified values of k hacked from https://github.com/rwightman/ | STRING |
| HIGH | code/chapter-9/a_rnn_lstm/utils/my_utils.py | 0 | computes the accuracy over the k top predictions for the specified values of k hacked from https://github.com/rwightman/ | STRING |
| HIGH | code/chapter-9/b_seq2seq/utils/my_utils.py | 0 | computes the accuracy over the k top predictions for the specified values of k hacked from https://github.com/rwightman/ | STRING |
| HIGH | code/chapter-9/c_transformer/utils/my_utils.py | 0 | computes the accuracy over the k top predictions for the specified values of k hacked from https://github.com/rwightman/ | STRING |
| HIGH | code/chapter-8/02_segmentation/utils/utils.py | 0 | computes the accuracy over the k top predictions for the specified values of k hacked from https://github.com/rwightman/ | STRING |
| HIGH | code/chapter-8/01_classification/utils/my_utils.py | 0 | computes the accuracy over the k top predictions for the specified values of k hacked from https://github.com/rwightman/ | STRING |
| HIGH | code/chapter-9/a_rnn_lstm/utils/my_utils.py | 0 | 加载预训练词向量权重 :param glove_file_path: :param word2idx: :return: | STRING |
| HIGH | code/chapter-9/b_seq2seq/utils/my_utils.py | 0 | 加载预训练词向量权重 :param glove_file_path: :param word2idx: :return: | STRING |
| HIGH | code/chapter-9/c_transformer/utils/my_utils.py | 0 | 加载预训练词向量权重 :param glove_file_path: :param word2idx: :return: | STRING |
| HIGH | code/chapter-9/e_gpt/generate.py | 0 | checks whether cp is the codepoint of a cjk character. | STRING |
| HIGH | code/chapter-9/e_gpt/tokenizations/tokenization_bert.py | 0 | checks whether cp is the codepoint of a cjk character. | STRING |
| HIGH | …-9/e_gpt/tokenizations/tokenization_bert_word_level.py | 0 | checks whether cp is the codepoint of a cjk character. | STRING |
| HIGH | code/chapter-9/d_bert/callback/optimizater/sgdw.py | 0 | performs a single lookahead optimization step. arguments: closure (callable, optional): a closure that reevaluates the m | STRING |
| HIGH | code/chapter-9/d_bert/callback/optimizater/lamb.py | 0 | performs a single lookahead optimization step. arguments: closure (callable, optional): a closure that reevaluates the m | STRING |
| HIGH | code/chapter-9/d_bert/callback/optimizater/lars.py | 0 | performs a single lookahead optimization step. arguments: closure (callable, optional): a closure that reevaluates the m | STRING |
| HIGH | code/chapter-9/d_bert/callback/optimizater/adamw.py | 0 | performs a single lookahead optimization step. arguments: closure (callable, optional): a closure that reevaluates the m | STRING |
| HIGH | code/chapter-9/d_bert/callback/optimizater/adabound.py | 0 | performs a single lookahead optimization step. arguments: closure (callable, optional): a closure that reevaluates the m | STRING |
| HIGH | code/chapter-9/d_bert/callback/optimizater/nadam.py | 0 | performs a single lookahead optimization step. arguments: closure (callable, optional): a closure that reevaluates the m | STRING |
| HIGH | code/chapter-9/d_bert/callback/optimizater/ralars.py | 0 | performs a single lookahead optimization step. arguments: closure (callable, optional): a closure that reevaluates the m | STRING |
| HIGH | code/chapter-9/d_bert/callback/optimizater/lookahead.py | 0 | performs a single lookahead optimization step. arguments: closure (callable, optional): a closure that reevaluates the m | STRING |
| HIGH | code/chapter-11/02_resnet_inference.py | 0 | 加载标签名 :param p_clsnames: :param p_clsnames_cn: :return: | STRING |
| HIGH | code/chapter-12/a_trt_infer_engine_resnet50.py | 0 | 加载标签名 :param p_clsnames: :param p_clsnames_cn: :return: | STRING |
| HIGH | code/chapter-12/01_trt_resnet50_cuda.py | 0 | 加载标签名 :param p_clsnames: :param p_clsnames_cn: :return: | STRING |
| HIGH | code/chapter-12/04_build_resnet50_by_api.py | 0 | 加载标签名 :param p_clsnames: :param p_clsnames_cn: :return: | STRING |
| HIGH | code/chapter-12/05_trt_resnet50_execute_v3.py | 0 | 加载标签名 :param p_clsnames: :param p_clsnames_cn: :return: | STRING |
| HIGH | code/chapter-12/02_trt_resnet50_pycuda.py | 0 | 加载标签名 :param p_clsnames: :param p_clsnames_cn: :return: | STRING |
| HIGH | code/chapter-8/02_segmentation/02_train_seg.py | 0 | @file name : train_script.py @author : tingsongyu https://github.com/tingsongyu @date : 2023-02-04 @brief : 肺炎xray图像分类训练 | STRING |
| HIGH | code/chapter-8/02_segmentation/03_train_architecture.py | 0 | @file name : train_script.py @author : tingsongyu https://github.com/tingsongyu @date : 2023-02-04 @brief : 肺炎xray图像分类训练 | STRING |
| HIGH | code/chapter-8/01_classification/train_aug.py | 0 | @file name : train_script.py @author : tingsongyu https://github.com/tingsongyu @date : 2023-02-04 @brief : 肺炎xray图像分类训练 | STRING |
| HIGH | code/chapter-8/01_classification/train_main.py | 0 | @file name : train_script.py @author : tingsongyu https://github.com/tingsongyu @date : 2023-02-04 @brief : 肺炎xray图像分类训练 | STRING |
| HIGH | code/chapter-8/05_cyclegan/models/test_model.py | 0 | initialize the cyclegan class. parameters: opt (option class)-- stores all the experiment flags; needs to be a subclass | STRING |
| HIGH | code/chapter-8/05_cyclegan/models/pix2pix_model.py | 0 | initialize the cyclegan class. parameters: opt (option class)-- stores all the experiment flags; needs to be a subclass | STRING |
| HIGH | code/chapter-8/05_cyclegan/models/cycle_gan_model.py | 0 | initialize the cyclegan class. parameters: opt (option class)-- stores all the experiment flags; needs to be a subclass | STRING |
| 34 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | code/chapter-7/01_torch_save_load.py | 41 | # "optimizer": optimizer.state_dict(), | COMMENT |
| LOW | code/chapter-9/e_gpt/cache/vocab_small.txt | 8161 | ##9 | COMMENT |
| LOW | code/chapter-9/e_gpt/cache/vocab_small.txt | 8601 | ##2015 | COMMENT |
| LOW | code/chapter-9/e_gpt/cache/vocab_small.txt | 8821 | ##bo | COMMENT |
| LOW | code/chapter-9/e_gpt/cache/vocab_small.txt | 9161 | 2019 | COMMENT |
| LOW | code/chapter-9/e_gpt/cache/vocab_small.txt | 9341 | ##46 | COMMENT |
| LOW | code/chapter-9/e_gpt/cache/vocab_small.txt | 9741 | ##king | COMMENT |
| LOW | code/chapter-9/e_gpt/cache/vocab_small.txt | 9761 | ##マ | COMMENT |
| LOW | code/chapter-9/e_gpt/cache/vocab_small.txt | 10141 | ofweek | COMMENT |
| LOW | code/chapter-9/e_gpt/cache/vocab_small.txt | 10281 | vcd | COMMENT |
| LOW | code/chapter-9/e_gpt/cache/vocab_small.txt | 11081 | ##atic | COMMENT |
| LOW | code/chapter-9/e_gpt/cache/vocab_small.txt | 11361 | ##ack | COMMENT |
| LOW | code/chapter-9/e_gpt/cache/vocab_small.txt | 11581 | 328 | COMMENT |
| LOW | code/chapter-9/e_gpt/cache/vocab_small.txt | 12401 | ##gas | COMMENT |
| LOW | code/chapter-9/e_gpt/cache/vocab_small.txt | 12501 | sylvia | COMMENT |
| LOW | code/chapter-9/e_gpt/cache/vocab_small.txt | 12941 | diary | COMMENT |
| LOW | code/chapter-9/e_gpt/cache/vocab_small.txt | 13061 | ##mes | COMMENT |
| LOW | code/chapter-9/e_gpt/cache/vocab_small.txt | 13121 | 828 | COMMENT |
| LOW | code/chapter-9/e_gpt/cache/vocab.txt | 8161 | ##9 | COMMENT |
| LOW | code/chapter-9/e_gpt/cache/vocab.txt | 8601 | ##2015 | COMMENT |
| LOW | code/chapter-9/e_gpt/cache/vocab.txt | 8821 | ##bo | COMMENT |
| LOW | code/chapter-9/e_gpt/cache/vocab.txt | 9161 | 2019 | COMMENT |
| LOW | code/chapter-9/e_gpt/cache/vocab.txt | 9341 | ##46 | COMMENT |
| LOW | code/chapter-9/e_gpt/cache/vocab.txt | 9741 | ##king | COMMENT |
| LOW | code/chapter-9/e_gpt/cache/vocab.txt | 9761 | ##マ | COMMENT |
| LOW | code/chapter-9/e_gpt/cache/vocab.txt | 10141 | ofweek | COMMENT |
| LOW | code/chapter-9/e_gpt/cache/vocab.txt | 10281 | vcd | COMMENT |
| LOW | code/chapter-9/e_gpt/cache/vocab.txt | 11081 | ##atic | COMMENT |
| LOW | code/chapter-9/e_gpt/cache/vocab.txt | 11361 | ##ack | COMMENT |
| LOW | code/chapter-9/e_gpt/cache/vocab.txt | 11581 | 328 | COMMENT |
| LOW | code/chapter-9/e_gpt/cache/vocab.txt | 12401 | ##gas | COMMENT |
| LOW | code/chapter-9/e_gpt/cache/vocab.txt | 12501 | sylvia | COMMENT |
| LOW | code/chapter-9/e_gpt/cache/vocab.txt | 12941 | diary | COMMENT |
| LOW | code/chapter-9/e_gpt/cache/vocab.txt | 13061 | ##mes | COMMENT |
| LOW | code/chapter-9/e_gpt/cache/vocab.txt | 13121 | 828 | COMMENT |
| LOW | code/chapter-9/e_gpt/cache/vocab.txt | 13301 | ##anda | COMMENT |
| LOW | code/chapter-9/e_gpt/cache/vocab.txt | 13321 | ##$ | COMMENT |
| LOW | code/chapter-9/e_gpt/cache/vocab.txt | 13341 | ##\ | COMMENT |
| LOW | code/chapter-9/e_gpt/cache/vocab.txt | 13361 | ##¼ | COMMENT |
| LOW | code/chapter-9/e_gpt/cache/vocab.txt | 13381 | ##α | COMMENT |
| LOW | code/chapter-9/e_gpt/cache/vocab.txt | 13401 | ##χ | COMMENT |
| LOW | code/chapter-9/e_gpt/cache/vocab.txt | 13421 | ##х | COMMENT |
| LOW | code/chapter-9/e_gpt/cache/vocab.txt | 13441 | ##ي | COMMENT |
| LOW | code/chapter-9/e_gpt/cache/vocab.txt | 13461 | ##ᄇ | COMMENT |
| LOW | code/chapter-9/e_gpt/cache/vocab.txt | 13481 | ##ᅯ | COMMENT |
| LOW | code/chapter-9/e_gpt/cache/vocab.txt | 13501 | ##‥ | COMMENT |
| LOW | code/chapter-9/e_gpt/cache/vocab.txt | 13521 | ##ⅱ | COMMENT |
| LOW | code/chapter-9/e_gpt/cache/vocab.txt | 13541 | ##∼ | COMMENT |
| LOW | code/chapter-9/e_gpt/cache/vocab.txt | 13561 | ##⑤ | COMMENT |
| LOW | code/chapter-9/e_gpt/cache/vocab.txt | 13581 | ##┆ | COMMENT |
| LOW | code/chapter-9/e_gpt/cache/vocab.txt | 13601 | ##▇ | COMMENT |
| LOW | code/chapter-9/e_gpt/cache/vocab.txt | 13621 | ##☕ | COMMENT |
| LOW | code/chapter-9/e_gpt/cache/vocab.txt | 13641 | ##✿ | COMMENT |
| LOW | code/chapter-9/e_gpt/cache/vocab.txt | 13661 | ##〓 | COMMENT |
| LOW | code/chapter-9/e_gpt/cache/vocab.txt | 13681 | ##ァ | COMMENT |
| LOW | code/chapter-9/e_gpt/cache/vocab.txt | 13701 | ##ヨ | COMMENT |
| LOW | code/chapter-9/e_gpt/cache/vocab.txt | 13721 | ##ㄤ | COMMENT |
| LOW | code/chapter-9/e_gpt/cache/vocab.txt | 13741 | ##专 | COMMENT |
| LOW | code/chapter-9/e_gpt/cache/vocab.txt | 13761 | ##丫 | COMMENT |
| LOW | code/chapter-9/e_gpt/cache/vocab.txt | 13781 | ##乌 | COMMENT |
| 389 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | code/chapter-7/01_torch_save_load.py | 10 | CODE | |
| LOW | code/chapter-7/06_albumentations-demo.py | 13 | CODE | |
| LOW | code/chapter-7/06_albumentations-demo.py | 13 | CODE | |
| LOW | code/chapter-7/06_albumentations-demo.py | 13 | CODE | |
| LOW | code/chapter-7/06_albumentations-demo.py | 13 | CODE | |
| LOW | code/chapter-7/06_albumentations-demo.py | 13 | CODE | |
| LOW | code/chapter-7/06_albumentations-demo.py | 13 | CODE | |
| LOW | code/chapter-7/06_albumentations-demo.py | 13 | CODE | |
| LOW | code/chapter-7/06_albumentations-demo.py | 13 | CODE | |
| LOW | code/chapter-7/06_albumentations-demo.py | 13 | CODE | |
| LOW | code/chapter-7/06_albumentations-demo.py | 13 | CODE | |
| LOW | code/chapter-7/06_albumentations-demo.py | 13 | CODE | |
| LOW | code/chapter-7/06_albumentations-demo.py | 13 | CODE | |
| LOW | code/chapter-7/06_albumentations-demo.py | 13 | CODE | |
| LOW | code/chapter-7/06_albumentations-demo.py | 13 | CODE | |
| LOW | code/chapter-7/06_albumentations-demo.py | 13 | CODE | |
| LOW | code/chapter-7/06_albumentations-demo.py | 13 | CODE | |
| LOW | code/chapter-7/06_albumentations-demo.py | 13 | CODE | |
| LOW | code/chapter-7/06_albumentations-demo.py | 13 | CODE | |
| LOW | code/chapter-7/06_albumentations-demo.py | 13 | CODE | |
| LOW | code/chapter-7/06_albumentations-demo.py | 13 | CODE | |
| LOW | code/chapter-7/06_albumentations-demo.py | 13 | CODE | |
| LOW | code/chapter-7/02_fintune-freeze.py | 15 | CODE | |
| LOW | code/chapter-7/02_fintune-freeze.py | 22 | CODE | |
| LOW | code/chapter-7/02_fintune-multi-lr.py | 15 | CODE | |
| LOW | code/chapter-7/02_fintune-multi-lr.py | 22 | CODE | |
| LOW | code/chapter-9/a_rnn_lstm/a_gen_vocabulary.py | 12 | CODE | |
| LOW | code/chapter-9/a_rnn_lstm/models/rnn.py | 10 | CODE | |
| LOW | code/chapter-9/a_rnn_lstm/models/rnn.py | 11 | CODE | |
| LOW | code/chapter-9/a_rnn_lstm/models/rnn.py | 12 | CODE | |
| LOW | code/chapter-9/a_rnn_lstm/models/rnn.py | 15 | CODE | |
| LOW | code/chapter-9/a_rnn_lstm/models/rnn.py | 16 | CODE | |
| LOW | code/chapter-9/a_rnn_lstm/models/rnn.py | 17 | CODE | |
| LOW | code/chapter-9/a_rnn_lstm/models/rnn.py | 18 | CODE | |
| LOW | code/chapter-9/a_rnn_lstm/models/rnn.py | 19 | CODE | |
| LOW | code/chapter-9/a_rnn_lstm/models/rnn.py | 20 | CODE | |
| LOW | code/chapter-9/e_gpt/train.py | 21 | CODE | |
| LOW | code/chapter-9/e_gpt/tokenizations/tokenization_bert.py | 17 | CODE | |
| LOW | code/chapter-9/e_gpt/tokenizations/tokenization_bert.py | 17 | CODE | |
| LOW | code/chapter-9/e_gpt/tokenizations/tokenization_bert.py | 17 | CODE | |
| LOW | code/chapter-9/e_gpt/tokenizations/tokenization_bert.py | 17 | CODE | |
| LOW | …-9/e_gpt/tokenizations/tokenization_bert_word_level.py | 17 | CODE | |
| LOW | …-9/e_gpt/tokenizations/tokenization_bert_word_level.py | 17 | CODE | |
| LOW | …-9/e_gpt/tokenizations/tokenization_bert_word_level.py | 17 | CODE | |
| LOW | …-9/e_gpt/tokenizations/tokenization_bert_word_level.py | 17 | CODE | |
| LOW | code/chapter-9/b_seq2seq/b_gen_vocabulary.py | 9 | CODE | |
| LOW | code/chapter-9/b_seq2seq/c_inference.py | 10 | CODE | |
| LOW | code/chapter-9/b_seq2seq/c_inference.py | 12 | CODE | |
| LOW | code/chapter-9/b_seq2seq/c_inference.py | 13 | CODE | |
| LOW | code/chapter-9/b_seq2seq/c_inference.py | 14 | CODE | |
| LOW | code/chapter-9/b_seq2seq/c_inference.py | 16 | CODE | |
| LOW | code/chapter-9/b_seq2seq/c_inference.py | 17 | CODE | |
| LOW | code/chapter-9/d_bert/run_ner_softmax.py | 1 | CODE | |
| LOW | code/chapter-9/d_bert/run_ner_softmax.py | 9 | CODE | |
| LOW | code/chapter-9/d_bert/metrics/ner_metrics.py | 1 | CODE | |
| LOW | …_bert/tools/convert_albert_tf_checkpoint_to_pytorch.py | 3 | CODE | |
| LOW | …_bert/tools/convert_albert_tf_checkpoint_to_pytorch.py | 4 | CODE | |
| LOW | …_bert/tools/convert_albert_tf_checkpoint_to_pytorch.py | 5 | CODE | |
| LOW | code/chapter-9/d_bert/processors/utils_ner.py | 4 | CODE | |
| LOW | code/chapter-9/d_bert/callback/optimizater/nadam.py | 1 | CODE | |
| 146 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | code/chapter-9/e_gpt/generate.py | 136 | CODE | |
| LOW | code/chapter-9/e_gpt/train.py | 128 | CODE | |
| LOW | code/chapter-9/e_gpt/tokenizations/tokenization_bert.py | 347 | CODE | |
| LOW | …-9/e_gpt/tokenizations/tokenization_bert_word_level.py | 364 | CODE | |
| LOW | code/chapter-9/d_bert/run_ner_softmax.py | 35 | CODE | |
| LOW | code/chapter-9/d_bert/run_ner_softmax.py | 196 | CODE | |
| LOW | code/chapter-9/d_bert/tools/common.py | 280 | CODE | |
| LOW | code/chapter-9/d_bert/tools/common.py | 295 | CODE | |
| LOW | code/chapter-9/d_bert/tools/common.py | 296 | CODE | |
| LOW | code/chapter-9/d_bert/processors/utils_ner.py | 78 | CODE | |
| LOW | code/chapter-9/d_bert/processors/utils_ner.py | 122 | CODE | |
| LOW | code/chapter-9/d_bert/processors/utils_ner.py | 32 | CODE | |
| LOW | code/chapter-9/d_bert/processors/utils_ner.py | 56 | CODE | |
| LOW | code/chapter-9/d_bert/processors/ner_seq.py | 181 | CODE | |
| LOW | code/chapter-9/d_bert/processors/ner_span.py | 197 | CODE | |
| LOW | code/chapter-9/d_bert/callback/lr_scheduler.py | 143 | CODE | |
| LOW | code/chapter-9/d_bert/callback/lr_scheduler.py | 301 | CODE | |
| LOW | code/chapter-9/d_bert/callback/lr_scheduler.py | 351 | CODE | |
| LOW | code/chapter-9/d_bert/callback/trainingmonitor.py | 26 | CODE | |
| LOW | code/chapter-9/d_bert/callback/optimizater/sgdw.py | 47 | CODE | |
| LOW | code/chapter-9/d_bert/callback/optimizater/adafactor.py | 67 | CODE | |
| LOW | code/chapter-9/d_bert/callback/optimizater/lars.py | 45 | CODE | |
| LOW | code/chapter-9/d_bert/callback/optimizater/radam.py | 25 | CODE | |
| LOW | code/chapter-9/d_bert/callback/optimizater/adabound.py | 52 | CODE | |
| LOW | code/chapter-9/d_bert/callback/optimizater/ralamb.py | 20 | CODE | |
| LOW | code/chapter-9/d_bert/callback/optimizater/lookahead.py | 80 | CODE | |
| LOW | code/chapter-9/c_transformer/train_transformer.py | 148 | CODE | |
| LOW | code/chapter-8/03_detection/visdrone2yolo.py | 16 | CODE | |
| LOW | …de/chapter-8/03_detection/yolov5-master/00-save-gif.py | 54 | CODE | |
| LOW | code/chapter-8/03_detection/yolov5-master/val.py | 99 | CODE | |
| LOW | code/chapter-8/03_detection/yolov5-master/val.py | 372 | CODE | |
| LOW | code/chapter-8/03_detection/yolov5-master/train.py | 70 | CODE | |
| LOW | code/chapter-8/03_detection/yolov5-master/train.py | 481 | CODE | |
| LOW | code/chapter-8/03_detection/yolov5-master/hubconf.py | 16 | CODE | |
| LOW | code/chapter-8/03_detection/yolov5-master/detect.py | 55 | CODE | |
| LOW | …e/chapter-8/03_detection/yolov5-master/classify/val.py | 45 | CODE | |
| LOW | …apter-8/03_detection/yolov5-master/classify/predict.py | 56 | CODE | |
| LOW | …chapter-8/03_detection/yolov5-master/classify/train.py | 56 | CODE | |
| LOW | …de/chapter-8/03_detection/yolov5-master/segment/val.py | 130 | CODE | |
| LOW | …de/chapter-8/03_detection/yolov5-master/segment/val.py | 436 | CODE | |
| LOW | …hapter-8/03_detection/yolov5-master/segment/predict.py | 56 | CODE | |
| LOW | …/chapter-8/03_detection/yolov5-master/segment/train.py | 69 | CODE | |
| LOW | …/chapter-8/03_detection/yolov5-master/segment/train.py | 507 | CODE | |
| LOW | …/chapter-8/03_detection/yolov5-master/utils/metrics.py | 222 | CODE | |
| LOW | …pter-8/03_detection/yolov5-master/utils/dataloaders.py | 930 | CODE | |
| LOW | …pter-8/03_detection/yolov5-master/utils/dataloaders.py | 990 | CODE | |
| LOW | …pter-8/03_detection/yolov5-master/utils/dataloaders.py | 241 | CODE | |
| LOW | …pter-8/03_detection/yolov5-master/utils/dataloaders.py | 439 | CODE | |
| LOW | …pter-8/03_detection/yolov5-master/utils/dataloaders.py | 750 | CODE | |
| LOW | …pter-8/03_detection/yolov5-master/utils/dataloaders.py | 808 | CODE | |
| LOW | …hapter-8/03_detection/yolov5-master/utils/downloads.py | 84 | CODE | |
| LOW | …de/chapter-8/03_detection/yolov5-master/utils/plots.py | 230 | CODE | |
| LOW | …de/chapter-8/03_detection/yolov5-master/utils/plots.py | 514 | CODE | |
| LOW | …pter-8/03_detection/yolov5-master/utils/torch_utils.py | 66 | CODE | |
| LOW | …pter-8/03_detection/yolov5-master/utils/torch_utils.py | 151 | CODE | |
| LOW | …pter-8/03_detection/yolov5-master/utils/torch_utils.py | 212 | CODE | |
| LOW | …pter-8/03_detection/yolov5-master/utils/torch_utils.py | 318 | CODE | |
| LOW | …/chapter-8/03_detection/yolov5-master/utils/general.py | 468 | CODE | |
| LOW | …/chapter-8/03_detection/yolov5-master/utils/general.py | 506 | CODE | |
| LOW | …/chapter-8/03_detection/yolov5-master/utils/general.py | 628 | CODE | |
| 67 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | code/chapter-8/03_detection/yolov5-master/val.py | 326 | except Exception as e: | CODE |
| LOW | code/chapter-8/03_detection/yolov5-master/export.py | 109 | except Exception as e: | CODE |
| LOW | code/chapter-8/03_detection/yolov5-master/export.py | 183 | except Exception as e: | CODE |
| LOW | code/chapter-8/03_detection/yolov5-master/export.py | 254 | except Exception: | CODE |
| LOW | code/chapter-8/03_detection/yolov5-master/export.py | 326 | except Exception: | CODE |
| LOW | code/chapter-8/03_detection/yolov5-master/hubconf.py | 59 | except Exception: | CODE |
| LOW | code/chapter-8/03_detection/yolov5-master/hubconf.py | 75 | except Exception as e: | CODE |
| LOW | code/chapter-8/03_detection/yolov5-master/benchmarks.py | 91 | except Exception as e: | CODE |
| LOW | code/chapter-8/03_detection/yolov5-master/benchmarks.py | 133 | except Exception: | CODE |
| LOW | …de/chapter-8/03_detection/yolov5-master/segment/val.py | 392 | except Exception as e: | CODE |
| LOW | …hapter-8/03_detection/yolov5-master/utils/autobatch.py | 55 | except Exception as e: | CODE |
| LOW | …pter-8/03_detection/yolov5-master/utils/dataloaders.py | 482 | except Exception as e: | CODE |
| LOW | …pter-8/03_detection/yolov5-master/utils/dataloaders.py | 492 | except Exception: | CODE |
| LOW | …pter-8/03_detection/yolov5-master/utils/dataloaders.py | 640 | except Exception as e: | CODE |
| LOW | …pter-8/03_detection/yolov5-master/utils/dataloaders.py | 1036 | except Exception as e: | CODE |
| LOW | …pter-8/03_detection/yolov5-master/utils/dataloaders.py | 1065 | except Exception as e: | CODE |
| LOW | …pter-8/03_detection/yolov5-master/utils/dataloaders.py | 1105 | except Exception as e: # use OpenCV | CODE |
| LOW | …hapter-8/03_detection/yolov5-master/utils/downloads.py | 70 | except Exception as e: # url2 | CODE |
| LOW⚡ | …hapter-8/03_detection/yolov5-master/utils/downloads.py | 112 | except Exception: | CODE |
| LOW⚡ | …hapter-8/03_detection/yolov5-master/utils/downloads.py | 115 | except Exception: | CODE |
| LOW⚡ | …hapter-8/03_detection/yolov5-master/utils/downloads.py | 118 | except Exception: | CODE |
| LOW | …de/chapter-8/03_detection/yolov5-master/utils/plots.py | 61 | except Exception: # download if missing | CODE |
| LOW | …de/chapter-8/03_detection/yolov5-master/utils/plots.py | 507 | except Exception as e: | CODE |
| LOW | …de/chapter-8/03_detection/yolov5-master/utils/plots.py | 539 | except Exception as e: | CODE |
| LOW | …apter-8/03_detection/yolov5-master/utils/autoanchor.py | 136 | except Exception: | CODE |
| LOW | …pter-8/03_detection/yolov5-master/utils/torch_utils.py | 104 | except Exception: | CODE |
| LOW | …pter-8/03_detection/yolov5-master/utils/torch_utils.py | 174 | except Exception: | CODE |
| LOW | …pter-8/03_detection/yolov5-master/utils/torch_utils.py | 185 | except Exception: # no backward method | CODE |
| LOW | …pter-8/03_detection/yolov5-master/utils/torch_utils.py | 195 | except Exception as e: | CODE |
| LOW | …pter-8/03_detection/yolov5-master/utils/torch_utils.py | 290 | except Exception: | CODE |
| LOW | …pter-8/03_detection/yolov5-master/utils/torch_utils.py | 357 | except Exception: | CODE |
| LOW | …/chapter-8/03_detection/yolov5-master/utils/general.py | 322 | except Exception: | CODE |
| LOW | …/chapter-8/03_detection/yolov5-master/utils/general.py | 420 | except Exception as e: | CODE |
| LOW | …/chapter-8/03_detection/yolov5-master/utils/general.py | 446 | except Exception as e: | CODE |
| LOW | …/chapter-8/03_detection/yolov5-master/utils/general.py | 594 | except Exception: | CODE |
| LOW | …/chapter-8/03_detection/yolov5-master/utils/general.py | 1130 | except Exception: | CODE |
| MEDIUM | …/chapter-8/03_detection/yolov5-master/utils/general.py | 1126 | def imwrite(path, im): | CODE |
| LOW | …er-8/03_detection/yolov5-master/utils/augmentations.py | 45 | except Exception as e: | CODE |
| LOW | …er-8/03_detection/yolov5-master/utils/augmentations.py | 343 | except Exception as e: | CODE |
| LOW | …8/03_detection/yolov5-master/utils/loggers/__init__.py | 113 | except Exception: | CODE |
| LOW | …8/03_detection/yolov5-master/utils/loggers/__init__.py | 392 | except Exception as e: | CODE |
| LOW | …ction/yolov5-master/utils/loggers/comet/comet_utils.py | 61 | except Exception as e: | CODE |
| LOW | …er-8/03_detection/yolov5-master/utils/segment/plots.py | 139 | except Exception as e: | CODE |
| LOW | …de/chapter-8/03_detection/yolov5-master/models/yolo.py | 387 | except Exception as e: | CODE |
| MEDIUM | …de/chapter-8/03_detection/yolov5-master/models/yolo.py | 388 | print(f'Error in {cfg}: {e}') | CODE |
| LOW | …pter-8/03_detection/yolov5-master/data/Objects365.yaml | 437 | except Exception as e: | CODE |
| LOW | …e/chapter-8/03_detection/yolov5-master/data/xView.yaml | 132 | except Exception as e: | CODE |
| LOW | code/chapter-8/04_tracking/utils/autobatch.py | 55 | except Exception as e: | CODE |
| LOW | code/chapter-8/04_tracking/utils/dataloaders.py | 482 | except Exception as e: | CODE |
| LOW | code/chapter-8/04_tracking/utils/dataloaders.py | 492 | except Exception: | CODE |
| LOW | code/chapter-8/04_tracking/utils/dataloaders.py | 640 | except Exception as e: | CODE |
| LOW | code/chapter-8/04_tracking/utils/dataloaders.py | 1036 | except Exception as e: | CODE |
| LOW | code/chapter-8/04_tracking/utils/dataloaders.py | 1065 | except Exception as e: | CODE |
| LOW | code/chapter-8/04_tracking/utils/dataloaders.py | 1105 | except Exception as e: # use OpenCV | CODE |
| LOW | code/chapter-8/04_tracking/utils/downloads.py | 70 | except Exception as e: # url2 | CODE |
| LOW⚡ | code/chapter-8/04_tracking/utils/downloads.py | 112 | except Exception: | CODE |
| LOW⚡ | code/chapter-8/04_tracking/utils/downloads.py | 115 | except Exception: | CODE |
| LOW⚡ | code/chapter-8/04_tracking/utils/downloads.py | 118 | except Exception: | CODE |
| LOW | code/chapter-8/04_tracking/utils/plots.py | 61 | except Exception: # download if missing | CODE |
| LOW | code/chapter-8/04_tracking/utils/plots.py | 507 | except Exception as e: | CODE |
| 27 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | code/chapter-7/my_utils.py | 87 | CODE | |
| LOW | code/chapter-7/my_utils.py | 124 | CODE | |
| LOW | code/chapter-9/e_gpt/tokenizations/tokenization_bert.py | 105 | CODE | |
| LOW | …-9/e_gpt/tokenizations/tokenization_bert_word_level.py | 108 | CODE | |
| LOW | code/chapter-9/d_bert/processors/ner_seq.py | 68 | CODE | |
| LOW | code/chapter-9/d_bert/processors/ner_seq.py | 29 | CODE | |
| LOW | code/chapter-9/d_bert/processors/ner_seq.py | 49 | CODE | |
| LOW | code/chapter-9/d_bert/processors/ner_span.py | 64 | CODE | |
| LOW | code/chapter-9/d_bert/processors/ner_span.py | 21 | CODE | |
| LOW | code/chapter-9/d_bert/processors/ner_span.py | 44 | CODE | |
| LOW | code/chapter-9/d_bert/callback/lr_scheduler.py | 143 | CODE | |
| LOW | code/chapter-9/d_bert/callback/lr_scheduler.py | 261 | CODE | |
| LOW | code/chapter-9/d_bert/callback/optimizater/adafactor.py | 18 | CODE | |
| LOW | code/chapter-9/c_transformer/c_train_curve_plot.py | 23 | CODE | |
| LOW | code/chapter-9/c_transformer/transformer/Models.py | 132 | CODE | |
| LOW | …de/chapter-8/03_detection/yolov5-master/00-save-gif.py | 54 | CODE | |
| LOW | code/chapter-8/03_detection/yolov5-master/val.py | 99 | CODE | |
| LOW | code/chapter-8/03_detection/yolov5-master/export.py | 311 | CODE | |
| LOW | code/chapter-8/03_detection/yolov5-master/export.py | 510 | CODE | |
| LOW | code/chapter-8/03_detection/yolov5-master/detect.py | 55 | CODE | |
| LOW | code/chapter-8/03_detection/yolov5-master/benchmarks.py | 52 | CODE | |
| LOW | code/chapter-8/03_detection/yolov5-master/benchmarks.py | 114 | CODE | |
| LOW | …e/chapter-8/03_detection/yolov5-master/classify/val.py | 45 | CODE | |
| LOW | …apter-8/03_detection/yolov5-master/classify/predict.py | 56 | CODE | |
| LOW | …de/chapter-8/03_detection/yolov5-master/segment/val.py | 130 | CODE | |
| LOW | …hapter-8/03_detection/yolov5-master/segment/predict.py | 56 | CODE | |
| LOW | …pter-8/03_detection/yolov5-master/utils/dataloaders.py | 103 | CODE | |
| LOW | …pter-8/03_detection/yolov5-master/utils/dataloaders.py | 439 | CODE | |
| LOW | …/chapter-8/03_detection/yolov5-master/utils/general.py | 889 | CODE | |
| LOW | …er-8/03_detection/yolov5-master/utils/augmentations.py | 144 | CODE | |
| LOW | …er-8/03_detection/yolov5-master/utils/augmentations.py | 305 | CODE | |
| LOW | …3_detection/yolov5-master/utils/segment/dataloaders.py | 23 | CODE | |
| LOW | …3_detection/yolov5-master/utils/segment/dataloaders.py | 84 | CODE | |
| LOW | …detection/yolov5-master/utils/segment/augmentations.py | 25 | CODE | |
| LOW | code/chapter-8/05_cyclegan/models/networks.py | 433 | CODE | |
| LOW | code/chapter-8/01_classification/utils/my_utils.py | 89 | CODE | |
| LOW | code/chapter-8/01_classification/utils/my_utils.py | 126 | CODE | |
| LOW | code/chapter-8/04_tracking/utils/dataloaders.py | 103 | CODE | |
| LOW | code/chapter-8/04_tracking/utils/dataloaders.py | 439 | CODE | |
| LOW | code/chapter-8/04_tracking/utils/general.py | 889 | CODE | |
| LOW | code/chapter-8/04_tracking/utils/augmentations.py | 144 | CODE | |
| LOW | code/chapter-8/04_tracking/utils/augmentations.py | 305 | CODE | |
| LOW | code/chapter-8/04_tracking/utils/segment/dataloaders.py | 23 | CODE | |
| LOW | code/chapter-8/04_tracking/utils/segment/dataloaders.py | 84 | CODE | |
| LOW | …e/chapter-8/04_tracking/utils/segment/augmentations.py | 25 | CODE | |
| LOW | …chapter-8/04_tracking/deep_sort/deep_sort/deep_sort.py | 14 | CODE | |
| LOW | …-8/07_image_captioning/clip_cap_base/my_utils/utils.py | 90 | CODE | |
| LOW | …/07_image_captioning/clip_cap_base/my_models/models.py | 147 | CODE | |
| LOW | …/07_image_captioning/clip_cap_base/my_models/models.py | 171 | CODE | |
| LOW | …e/chapter-8/07_image_captioning/cnn_rnn_base/models.py | 39 | CODE | |
| LOW | code/chapter-6/my_utils.py | 61 | CODE | |
| LOW | code/chapter-6/my_utils.py | 95 | CODE | |
| LOW | code/chapter-2/02_COVID_19_cls.py | 97 | CODE | |
| LOW | code/chapter-5/02_sgd.py | 95 | CODE | |
| LOW | code/chapter-5/03_lr_scheduler.py | 97 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | code/chapter-7/07_model_ensemble.py | 263 | # Print results on different ensemble methods | COMMENT |
| LOW | code/chapter-9/d_bert/run_ner_softmax.py | 62 | # Check if saved optimizer or scheduler states exist | COMMENT |
| LOW | code/chapter-9/d_bert/run_ner_softmax.py | 96 | # Check if continuing training from a checkpoint | COMMENT |
| LOW | code/chapter-9/d_bert/tools/plot.py | 52 | # Loop over data dimensions and create text annotations. | COMMENT |
| LOW | code/chapter-9/d_bert/models/layers/crf.py | 231 | # Set score to the next score if this timestep is valid (mask == 1) | COMMENT |
| LOW | code/chapter-9/d_bert/models/layers/crf.py | 294 | # Set score to the next score if this timestep is valid (mask == 1) | COMMENT |
| LOW | code/chapter-9/d_bert/models/layers/crf.py | 382 | # Set score to the next score if this timestep is valid (mask == 1) | COMMENT |
| LOW | …de/chapter-8/03_detection/yolov5-master/00-save-gif.py | 157 | # Print results | COMMENT |
| LOW | …de/chapter-8/03_detection/yolov5-master/00-save-gif.py | 209 | # Print results | COMMENT |
| LOW | code/chapter-8/03_detection/yolov5-master/val.py | 281 | # Print results | COMMENT |
| LOW | code/chapter-8/03_detection/yolov5-master/val.py | 287 | # Print results per class | COMMENT |
| LOW | code/chapter-8/03_detection/yolov5-master/detect.py | 158 | # Print results | COMMENT |
| LOW | code/chapter-8/03_detection/yolov5-master/detect.py | 210 | # Print results | COMMENT |
| LOW | code/chapter-8/03_detection/yolov5-master/benchmarks.py | 99 | # Print results | COMMENT |
| LOW | code/chapter-8/03_detection/yolov5-master/benchmarks.py | 136 | # Print results | COMMENT |
| LOW | …e/chapter-8/03_detection/yolov5-master/classify/val.py | 135 | # Print results | COMMENT |
| LOW | …apter-8/03_detection/yolov5-master/classify/predict.py | 140 | # Print results | COMMENT |
| LOW | …apter-8/03_detection/yolov5-master/classify/predict.py | 184 | # Print results | COMMENT |
| LOW | …de/chapter-8/03_detection/yolov5-master/segment/val.py | 344 | # Print results | COMMENT |
| LOW | …de/chapter-8/03_detection/yolov5-master/segment/val.py | 350 | # Print results per class | COMMENT |
| LOW | …hapter-8/03_detection/yolov5-master/segment/predict.py | 170 | # Print results | COMMENT |
| LOW | …hapter-8/03_detection/yolov5-master/segment/predict.py | 231 | # Print results | COMMENT |
| LOW | …hapter-8/03_detection/yolov5-master/utils/downloads.py | 17 | # Check if string is URL and check if URL exists | COMMENT |
| LOW | …/chapter-8/03_detection/yolov5-master/utils/general.py | 437 | # Check if environment supports image displays | COMMENT |
| LOW | …etection/yolov5-master/utils/loggers/comet/__init__.py | 157 | # Check if running the Experiment with the Comet Optimizer | COMMENT |
| LOW | …etection/yolov5-master/utils/loggers/comet/__init__.py | 433 | # Check if running Experiment with Comet Optimizer | COMMENT |
| LOW | …n/yolov5-master/utils/loggers/clearml/clearml_utils.py | 112 | # Set data to data_dict because wandb will crash without this information and opt is the best way | COMMENT |
| LOW | code/chapter-8/04_tracking/utils/downloads.py | 17 | # Check if string is URL and check if URL exists | COMMENT |
| LOW | code/chapter-8/04_tracking/utils/general.py | 437 | # Check if environment supports image displays | COMMENT |
| LOW | …/chapter-8/04_tracking/utils/loggers/comet/__init__.py | 157 | # Check if running the Experiment with the Comet Optimizer | COMMENT |
| LOW | …/chapter-8/04_tracking/utils/loggers/comet/__init__.py | 433 | # Check if running Experiment with Comet Optimizer | COMMENT |
| LOW | …r-8/04_tracking/utils/loggers/clearml/clearml_utils.py | 112 | # Set data to data_dict because wandb will crash without this information and opt is the best way | COMMENT |
| LOW | …chapter-8/07_image_captioning/cnn_rnn_base/01_train.py | 125 | # Check if there was an improvement | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | code/chapter-9/d_bert/02_predict_parse.py | 12 | def extract_entities_from_lines(test_data_path, predictions_path): | CODE |
| LOW | …_bert/tools/convert_albert_tf_checkpoint_to_pytorch.py | 14 | def convert_tf_checkpoint_to_pytorch(tf_checkpoint_path, bert_config_file, pytorch_dump_path): | CODE |
| LOW | code/chapter-9/d_bert/processors/utils_ner.py | 6 | class DataProcessor(object): | CODE |
| LOW | code/chapter-9/d_bert/processors/ner_seq.py | 68 | def convert_examples_to_features(examples,label_list,max_seq_length,tokenizer, | CODE |
| LOW | code/chapter-9/d_bert/processors/ner_span.py | 64 | def convert_examples_to_features(examples,label_list,max_seq_length,tokenizer, | CODE |
| LOW | code/chapter-9/d_bert/callback/lr_scheduler.py | 13 | def get_constant_schedule_with_warmup(optimizer, num_warmup_steps, last_epoch=-1): | CODE |
| LOW | code/chapter-9/d_bert/callback/lr_scheduler.py | 25 | def get_linear_schedule_with_warmup(optimizer, num_warmup_steps, num_training_steps, last_epoch=-1): | CODE |
| LOW | code/chapter-9/d_bert/callback/lr_scheduler.py | 37 | def get_cosine_schedule_with_warmup(optimizer, num_warmup_steps, num_training_steps, num_cycles=.5, last_epoch=-1): | CODE |
| LOW | code/chapter-9/d_bert/callback/lr_scheduler.py | 51 | def get_cosine_with_hard_restarts_schedule_with_warmup(optimizer, num_warmup_steps, num_training_steps, num_cycles=1., l | CODE |
| LOW | code/chapter-9/c_transformer/transformer/Models.py | 32 | def _get_sinusoid_encoding_table(self, n_position, d_hid): | CODE |
| LOW | code/chapter-9/c_transformer/transformer/Translator.py | 60 | def _get_the_best_score_and_idx(self, gen_seq, dec_output, scores, step): | CODE |
| LOW | …e/chapter-8/03_detection/yolov5-master/utils/triton.py | 32 | def create_input_placeholders() -> typing.List[InferInput]: | CODE |
| LOW | …e/chapter-8/03_detection/yolov5-master/utils/triton.py | 44 | def create_input_placeholders() -> typing.List[InferInput]: | CODE |
| LOW | …pter-8/03_detection/yolov5-master/utils/dataloaders.py | 1197 | def create_classification_dataloader(path, | CODE |
| LOW | …pter-8/03_detection/yolov5-master/utils/torch_utils.py | 66 | def reshape_classifier_output(model, n=1000): | CODE |
| LOW | …pter-8/03_detection/yolov5-master/utils/torch_utils.py | 89 | def torch_distributed_zero_first(local_rank: int): | CODE |
| LOW | …8/03_detection/yolov5-master/utils/loggers/__init__.py | 151 | def on_pretrain_routine_start(self): | CODE |
| LOW | …etection/yolov5-master/utils/loggers/comet/__init__.py | 348 | def download_dataset_artifact(self, artifact_path): | CODE |
| LOW | …ction/yolov5-master/utils/loggers/comet/comet_utils.py | 19 | def download_model_checkpoint(opt, experiment): | CODE |
| LOW | …-8/03_detection/yolov5-master/utils/segment/metrics.py | 17 | def ap_per_class_box_and_mask( | CODE |
| LOW | code/chapter-8/03_detection/yolov5-master/models/tf.py | 554 | def representative_dataset_gen(dataset, ncalib=100): | CODE |
| LOW | code/chapter-8/05_cyclegan/util/visualizer.py | 107 | def create_visdom_connections(self): | CODE |
| LOW | code/chapter-8/05_cyclegan/models/test_model.py | 12 | def modify_commandline_options(parser, is_train=True): | CODE |
| LOW | code/chapter-8/05_cyclegan/models/template_model.py | 25 | def modify_commandline_options(parser, is_train=True): | CODE |
| LOW | code/chapter-8/05_cyclegan/models/cycle_gan_model.py | 20 | def modify_commandline_options(parser, is_train=True): | CODE |
| LOW | code/chapter-8/05_cyclegan/models/pix2pix_model.py | 17 | def modify_commandline_options(parser, is_train=True): | CODE |
| LOW | code/chapter-8/05_cyclegan/models/colorization_model.py | 15 | def modify_commandline_options(parser, is_train=True): | CODE |
| LOW | code/chapter-8/05_cyclegan/models/base_model.py | 47 | def modify_commandline_options(parser, is_train): | CODE |
| LOW | code/chapter-8/05_cyclegan/models/base_model.py | 162 | def __patch_instance_norm_state_dict(self, state_dict, module, keys, i=0): | CODE |
| LOW | code/chapter-8/05_cyclegan/data/colorization_dataset.py | 16 | def modify_commandline_options(parser, is_train): | CODE |
| LOW | code/chapter-8/05_cyclegan/data/base_dataset.py | 33 | def modify_commandline_options(parser, is_train): | CODE |
| LOW | code/chapter-8/05_cyclegan/data/template_dataset.py | 22 | def modify_commandline_options(parser, is_train): | CODE |
| LOW | …apter-8/06_diffusion-model/DDPM/Diffusion/Diffusion.py | 71 | def predict_xt_prev_mean_from_eps(self, x_t, t, eps): | CODE |
| LOW | …model/DDPM/DiffusionFreeGuidence/DiffusionCondition.py | 68 | def predict_xt_prev_mean_from_eps(self, x_t, t, eps): | CODE |
| LOW | code/chapter-8/04_tracking/01-main.py | 125 | def get_currently_ids_by_area(tracks, bbox_area_list_, area_index): | CODE |
| LOW | code/chapter-8/04_tracking/utils/triton.py | 32 | def create_input_placeholders() -> typing.List[InferInput]: | CODE |
| LOW | code/chapter-8/04_tracking/utils/triton.py | 44 | def create_input_placeholders() -> typing.List[InferInput]: | CODE |
| LOW | code/chapter-8/04_tracking/utils/dataloaders.py | 1197 | def create_classification_dataloader(path, | CODE |
| LOW | code/chapter-8/04_tracking/utils/torch_utils.py | 66 | def reshape_classifier_output(model, n=1000): | CODE |
| LOW | code/chapter-8/04_tracking/utils/torch_utils.py | 89 | def torch_distributed_zero_first(local_rank: int): | CODE |
| LOW | code/chapter-8/04_tracking/utils/loggers/__init__.py | 151 | def on_pretrain_routine_start(self): | CODE |
| LOW | …/chapter-8/04_tracking/utils/loggers/comet/__init__.py | 348 | def download_dataset_artifact(self, artifact_path): | CODE |
| LOW | …apter-8/04_tracking/utils/loggers/comet/comet_utils.py | 19 | def download_model_checkpoint(opt, experiment): | CODE |
| LOW | code/chapter-8/04_tracking/utils/segment/metrics.py | 17 | def ap_per_class_box_and_mask( | CODE |
| LOW | code/chapter-8/04_tracking/models/tf.py | 554 | def representative_dataset_gen(dataset, ncalib=100): | CODE |
| LOW | …e/chapter-8/04_tracking/deep_sort/utils/json_logger.py | 358 | def schedule_output_by_frames(self, frames_quota, frame_counter, output_dir=JsonMeta.PATH_TO_SAVE): | CODE |
| LOW | …e/chapter-8/07_image_captioning/cnn_rnn_base/models.py | 133 | def load_pretrained_embeddings(self, embeddings): | CODE |
| LOW | …ter-8/07_image_captioning/cnn_rnn_base/02_inference.py | 21 | def caption_image_beam_search(encoder, decoder, img, word_map, beam_size=3): | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | …e/chapter-8/04_tracking/deep_sort/utils/json_logger.py | 196 | Args: frame_id (int): timestamp (float): opencv captured frame time property R | STRING |
| HIGH | …e/chapter-8/04_tracking/deep_sort/utils/json_logger.py | 228 | Args: frame_id: bbox_id: Returns: bbox_id (int): Raises: | STRING |
| HIGH | …e/chapter-8/04_tracking/deep_sort/utils/json_logger.py | 246 | Args: frame_id (int): bbox_id (int): top (int): left (int): | STRING |
| HIGH | …e/chapter-8/04_tracking/deep_sort/utils/json_logger.py | 274 | Args: frame_id: bbox_id: category: confidence: the confidence v | STRING |
| HIGH | …e/chapter-8/04_tracking/deep_sort/utils/json_logger.py | 307 | Args: output_name: Returns: None Notes: It creates the js | STRING |
| HIGH | …e/chapter-8/04_tracking/deep_sort/utils/json_logger.py | 328 | Notes: Creates folder and then periodically stores the jsons on that address. Args: | STRING |
| HIGH | …e/chapter-8/04_tracking/deep_sort/utils/json_logger.py | 369 | Notes: We use this function to output jsons whenever possible. like the time that we ex | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | code/chapter-9/a_rnn_lstm/models/rnn.py | 103 | # Create an instance of the RNNTextClassifier | COMMENT |
| MEDIUM | …pter-8/03_detection/yolov5-master/utils/dataloaders.py | 321 | # Create a new video capture object | COMMENT |
| MEDIUM | …hapter-8/03_detection/yolov5-master/utils/callbacks.py | 15 | # Define the available callbacks | COMMENT |
| MEDIUM | …de/chapter-8/03_detection/yolov5-master/models/yolo.py | 280 | # Create a YOLOv5 classification model from a YOLOv5 detection model | COMMENT |
| MEDIUM | …de/chapter-8/03_detection/yolov5-master/models/yolo.py | 295 | # Create a YOLOv5 classification model from a *.yaml file | COMMENT |
| MEDIUM | code/chapter-8/05_cyclegan/util/image_pool.py | 6 | """This class implements an image buffer that stores previously generated images. | STRING |
| MEDIUM | code/chapter-8/05_cyclegan/models/base_model.py | 9 | """This class is an abstract base class (ABC) for models. | STRING |
| MEDIUM | code/chapter-8/05_cyclegan/data/base_dataset.py | 1 | """This module implements an abstract base class (ABC) 'BaseDataset' for datasets. | STRING |
| MEDIUM | code/chapter-8/05_cyclegan/data/base_dataset.py | 14 | """This class is an abstract base class (ABC) for datasets. | STRING |
| MEDIUM | code/chapter-8/04_tracking/utils/dataloaders.py | 321 | # Create a new video capture object | COMMENT |
| MEDIUM | code/chapter-8/04_tracking/utils/callbacks.py | 15 | # Define the available callbacks | COMMENT |
| MEDIUM | code/chapter-8/04_tracking/models/yolo.py | 280 | # Create a YOLOv5 classification model from a YOLOv5 detection model | COMMENT |
| MEDIUM | code/chapter-8/04_tracking/models/yolo.py | 295 | # Create a YOLOv5 classification model from a *.yaml file | COMMENT |
| MEDIUM | …de/chapter-8/07_image_captioning/cnn_rnn_base/utils.py | 80 | # Create a base/root name for all output files | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | …er-8/03_detection/yolov5-master/utils/augmentations.py | 43 | except ImportError: # package not installed, skip | CODE |
| HIGH | code/chapter-8/03_detection/yolov5-master/models/tf.py | 394 | except NameError: | CODE |
| HIGH | code/chapter-8/04_tracking/utils/augmentations.py | 43 | except ImportError: # package not installed, skip | CODE |
| HIGH | code/chapter-8/04_tracking/models/tf.py | 394 | except NameError: | CODE |
| HIGH | code/chapter-10/cli_demo_baichuan2.py | 78 | except KeyboardInterrupt: | CODE |
| HIGH | scripts/gen_star_history.py | 64 | except Exception: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM⚡ | code/chapter-8/05_cyclegan/models/template_model.py | 57 | # you can use opt.isTrain to specify different behaviors for training and test. For example, some networks will | COMMENT |
| MEDIUM⚡ | code/chapter-8/05_cyclegan/models/template_model.py | 59 | # define networks; you can use opt.isTrain to specify different behaviors for training and test. | COMMENT |
| MEDIUM⚡ | code/chapter-8/05_cyclegan/models/template_model.py | 66 | # If two networks are updated at the same time, you can use itertools.chain to group them. See cycle_gan_mod | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | code/chapter-9/e_gpt/tokenizations/tokenization_bert.py | 27 | logger = logging.getLogger(__name__) | CODE |
| LOW | …-9/e_gpt/tokenizations/tokenization_bert_word_level.py | 28 | logger = logging.getLogger(__name__) | CODE |
| LOW | code/chapter-9/d_bert/processors/ner_seq.py | 8 | logger = logging.getLogger(__name__) | CODE |
| LOW | code/chapter-9/d_bert/processors/ner_span.py | 8 | logger = logging.getLogger(__name__) | CODE |
| LOW | code/chapter-9/c_transformer/transformer/__init__.py | 9 | __all__ = [ | CODE |
| LOW | …etection/yolov5-master/utils/loggers/comet/__init__.py | 8 | logger = logging.getLogger(__name__) | CODE |
| LOW | …ction/yolov5-master/utils/loggers/comet/comet_utils.py | 12 | logger = logging.getLogger(__name__) | CODE |
| LOW | …/03_detection/yolov5-master/utils/loggers/comet/hpo.py | 10 | logger = logging.getLogger(__name__) | CODE |
| LOW | …/chapter-8/04_tracking/utils/loggers/comet/__init__.py | 8 | logger = logging.getLogger(__name__) | CODE |
| LOW | …apter-8/04_tracking/utils/loggers/comet/comet_utils.py | 12 | logger = logging.getLogger(__name__) | CODE |
| LOW | code/chapter-8/04_tracking/utils/loggers/comet/hpo.py | 10 | logger = logging.getLogger(__name__) | CODE |
| LOW | …/chapter-8/04_tracking/deep_sort/deep_sort/__init__.py | 4 | __all__ = ['DeepSort', 'build_tracker'] | CODE |
| LOW | …chapter-8/04_tracking/deep_sort/deep_sort/deep_sort.py | 10 | __all__ = ['DeepSort'] | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | code/chapter-11/01_resnet_export_onnx.py | 18 | dummy_data = torch.randn((1, 3, 224, 224)) | CODE |
| LOW⚡ | code/chapter-11/01_resnet_export_onnx.py | 22 | torch.onnx.export(model, (dummy_data), "resnet50_bs_1.onnx", | CODE |
| LOW⚡ | code/chapter-11/01_resnet_export_onnx.py | 30 | torch.onnx.export(model, (dummy_data), "resnet50_bs_dynamic.onnx", | CODE |
| LOW | code/chapter-8/05_cyclegan/models/networks.py | 278 | def cal_gradient_penalty(netD, real_data, fake_data, device, type='mixed', constant=1.0, lambda_gp=10.0): | CODE |
| LOW | code/chapter-8/05_cyclegan/models/networks.py | 284 | fake_data (tensor array) -- generated images from the generator | STRING |
| LOW | code/chapter-8/05_cyclegan/models/networks.py | 296 | interpolatesv = fake_data | CODE |
| LOW | code/chapter-8/05_cyclegan/models/networks.py | 300 | interpolatesv = alpha * real_data + ((1 - alpha) * fake_data) | CODE |
| LOW | …e/chapter-8/01_classification/01_resnet_export_onnx.py | 34 | dummy_data = torch.randn((1, 3, 224, 224)) | CODE |
| LOW | …e/chapter-8/01_classification/01_resnet_export_onnx.py | 39 | torch.onnx.export(model, (dummy_data), path_out, | CODE |
| LOW | …/07_image_captioning/clip_cap_base/my_models/models.py | 168 | dummy_token = self.get_dummy_token(tokens.shape[0], tokens.device) | CODE |
| LOW | …/07_image_captioning/clip_cap_base/my_models/models.py | 169 | labels = torch.cat((dummy_token, tokens), dim=1) | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | code/chapter-1/03-torch-compile-performance.py | 148 | # Step 1: Normalize the input arrays to have zero mean and unit variance | COMMENT |
| LOW⚡ | code/chapter-1/03-torch-compile-performance.py | 159 | # Step 2: Perform the tensor product followed by sum over last two dimensions | COMMENT |
| LOW⚡ | code/chapter-1/03-torch-compile-performance.py | 162 | # Step 3: Apply thresholding to clip values outside of [-1, 1] | COMMENT |
| LOW⚡ | code/chapter-1/03-torch-compile-performance.py | 165 | # Step 4: Apply exponential function for non-linearity | COMMENT |
| LOW⚡ | code/chapter-1/03-torch-compile-performance.py | 168 | # Step 5: Add a small regularization term to avoid overfitting | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | code/chapter-1/03-torch-compile-performance.py | 148 | # Step 1: Normalize the input arrays to have zero mean and unit variance | COMMENT |
| LOW⚡ | code/chapter-1/03-torch-compile-performance.py | 159 | # Step 2: Perform the tensor product followed by sum over last two dimensions | COMMENT |
| LOW⚡ | code/chapter-1/03-torch-compile-performance.py | 162 | # Step 3: Apply thresholding to clip values outside of [-1, 1] | COMMENT |
| LOW⚡ | code/chapter-1/03-torch-compile-performance.py | 165 | # Step 4: Apply exponential function for non-linearity | COMMENT |
| LOW⚡ | code/chapter-1/03-torch-compile-performance.py | 168 | # Step 5: Add a small regularization term to avoid overfitting | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | code/chapter-9/a_rnn_lstm/models/rnn.py | 96 | # Example usage | COMMENT |
| LOW | code/chapter-9/b_seq2seq/models/seq2seq.py | 137 | # Example usage | COMMENT |
| LOW | …hapter-8/03_detection/yolov5-master/utils/autobatch.py | 23 | # Usage: | COMMENT |
| LOW | …/chapter-8/03_detection/yolov5-master/models/common.py | 318 | # Usage: | COMMENT |
| LOW | code/chapter-8/04_tracking/utils/autobatch.py | 23 | # Usage: | COMMENT |
| LOW | code/chapter-8/04_tracking/models/common.py | 318 | # Usage: | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | code/chapter-6/04_cam_series_demo.py | 86 | # In this example grayscale_cam has only one image in the batch: | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | …/chapter-8/03_detection/yolov5-master/models/common.py | 623 | # YOLOv5 input-robust model wrapper for passing cv2/np/PIL/torch inputs. Includes preprocessing, inference and NMS | COMMENT |
| MEDIUM | code/chapter-8/04_tracking/models/common.py | 623 | # YOLOv5 input-robust model wrapper for passing cv2/np/PIL/torch inputs. Includes preprocessing, inference and NMS | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | …er-8/03_detection/yolov5-master/utils/augmentations.py | 325 | # TODO: implement AugMix, AutoAug & RandAug in albumentation | COMMENT |
| LOW | code/chapter-8/04_tracking/utils/augmentations.py | 325 | # TODO: implement AugMix, AutoAug & RandAug in albumentation | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | code/chapter-8/03_detection/yolov5-master/export.py | 41 | $ cd .. && git clone https://github.com/zldrobit/tfjs-yolov5-example.git && cd tfjs-yolov5-example | STRING |