上一页 1 ··· 38 39 40 41 42 43 44 45 46 ··· 404 下一页
摘要: Transformers 源码解析(一百二十七) .\models\xlm_roberta\modeling_tf_xlm_roberta.py # 编码声明,指定文件编码为UTF-8 # 版权声明,版权归Facebook AI Research和HuggingFace Inc.团队所有 # 版权声 阅读全文
posted @ 2024-07-01 10:53 绝不原创的飞龙 阅读(21) 评论(0) 推荐(0) 编辑
摘要: Transformers 源码解析(一百二十六) .\models\xlm\modeling_xlm.py # coding=utf-8 # Copyright 2019-present, Facebook, Inc and the HuggingFace Inc. team. # # Licens 阅读全文
posted @ 2024-07-01 10:53 绝不原创的飞龙 阅读(8) 评论(0) 推荐(0) 编辑
摘要: Transformers 源码解析(一百二十九) .\models\xmod\__init__.py # flake8: noqa # 禁用 flake8 检查,因为无法忽略 "F401 '...' imported but unused" 警告,但要保留其他警告。因此完全不检查此模块。 # Cop 阅读全文
posted @ 2024-07-01 10:53 绝不原创的飞龙 阅读(12) 评论(0) 推荐(0) 编辑
摘要: Transformers 源码解析(一百二十二) .\models\wav2vec2\__init__.py # 导入必要的模块和函数 from typing import TYPE_CHECKING # 从内部模块中导入异常类和延迟加载模块 from ...utils import ( Optio 阅读全文
posted @ 2024-07-01 10:53 绝不原创的飞龙 阅读(27) 评论(0) 推荐(0) 编辑
摘要: Transformers 源码解析(一百二十八) .\models\xlm_roberta_xl\__init__.py # 引入类型检查模块 from typing import TYPE_CHECKING # 引入自定义的异常和模块懒加载工具函数 from ...utils import Opt 阅读全文
posted @ 2024-06-30 15:41 绝不原创的飞龙 阅读(9) 评论(0) 推荐(0) 编辑
摘要: Transformers 源码解析(一百二十) .\models\vit_msn\__init__.py # 导入所需模块和函数 from typing import TYPE_CHECKING # 从当前项目的utils模块中导入异常类和LazyModule类,还有is_torch_availab 阅读全文
posted @ 2024-06-30 15:40 绝不原创的飞龙 阅读(2) 评论(0) 推荐(0) 编辑
摘要: Transformers 源码解析(一百) .\models\seamless_m4t\convert_fairseq2_to_hf.py # 指定 Python 文件的编码格式为 UTF-8 # 版权声明,声明代码版权归 The HuggingFace Inc. 团队所有,保留所有权利 # # 根 阅读全文
posted @ 2024-06-30 15:40 绝不原创的飞龙 阅读(25) 评论(0) 推荐(0) 编辑
摘要: Transformers 源码解析(一) .\activations.py # 导入必要的库 import math from collections import OrderedDict # 导入 PyTorch 相关模块 import torch from packaging import ve 阅读全文
posted @ 2024-06-30 15:39 绝不原创的飞龙 阅读(44) 评论(0) 推荐(0) 编辑
摘要: Transformers 源码解析(五十一) .\models\funnel\modeling_tf_funnel.py # coding=utf-8 # Copyright 2020-present Google Brain and Carnegie Mellon University Autho 阅读全文
posted @ 2024-06-30 15:39 绝不原创的飞龙 阅读(4) 评论(0) 推荐(0) 编辑
摘要: Transformers 源码解析(五十五) .\models\gptsan_japanese\tokenization_gptsan_japanese.py # 指定文件编码为 UTF-8 # 版权声明,版权归 HuggingFace Inc. 团队所有 # # 根据 Apache 许可证 2.0 阅读全文
posted @ 2024-06-30 15:39 绝不原创的飞龙 阅读(23) 评论(0) 推荐(0) 编辑
上一页 1 ··· 38 39 40 41 42 43 44 45 46 ··· 404 下一页