上一页 1 ··· 36 37 38 39 40 41 42 43 44 ··· 404 下一页
摘要: Transformers 源码解析(一百三十三) .\processing_utils.py # 设置文件编码为 UTF-8 # 版权声明,声明代码的版权归 The HuggingFace Inc. 团队所有 # # 根据 Apache 许可证版本 2.0 使用此文件,除非遵守许可证,否则不得使用此 阅读全文
posted @ 2024-07-01 10:55 绝不原创的飞龙 阅读(107) 评论(0) 推荐(0) 编辑
摘要: Transformers 源码解析(一百三十七) .\training_args_seq2seq.py # 导入日志模块,用于记录程序运行时的信息 import logging # 导入数据类装饰器和字段装饰器 from dataclasses import dataclass, field # 导 阅读全文
posted @ 2024-07-01 10:55 绝不原创的飞龙 阅读(29) 评论(0) 推荐(0) 编辑
摘要: Transformers 源码解析(一百三十六) .\trainer_callback.py # coding=utf-8 # 定义编码格式为UTF-8 # Copyright 2020-present the HuggingFace Inc. team. # 版权声明,指出代码的版权归Huggin 阅读全文
posted @ 2024-07-01 10:55 绝不原创的飞龙 阅读(124) 评论(0) 推荐(0) 编辑
摘要: Transformers 源码解析(一百三十九) .\utils\fx.py # 导入 Python 内置模块和第三方库 import builtins import collections import functools import inspect import math import ope 阅读全文
posted @ 2024-07-01 10:54 绝不原创的飞龙 阅读(45) 评论(0) 推荐(0) 编辑
摘要: Transformers 源码解析(一百三十二) .\pipelines\pt_utils.py import numpy as np import torch from torch.utils.data import Dataset, IterableDataset from ..utils.ge 阅读全文
posted @ 2024-07-01 10:54 绝不原创的飞龙 阅读(39) 评论(0) 推荐(0) 编辑
摘要: Transformers 源码解析(一百三十八) .\utils\dummy_sentencepiece_and_tokenizers_objects.py # 这个文件是通过命令 `make fix-copies` 自动生成的,不要编辑。 # 从上层模块导入 DummyObject 和 requi 阅读全文
posted @ 2024-07-01 10:54 绝不原创的飞龙 阅读(5) 评论(0) 推荐(0) 编辑
摘要: Transformers 源码解析(一百三十) .\models\yolos\__init__.py # 版权声明和许可信息 # 2022 年由 HuggingFace 团队保留所有权利 # # 根据 Apache 许可证 2.0 版本(“许可证”)授权 # 您除非符合许可证的规定,否则不得使用此文 阅读全文
posted @ 2024-07-01 10:54 绝不原创的飞龙 阅读(39) 评论(0) 推荐(0) 编辑
摘要: Transformers 源码解析(一百零一) .\models\seamless_m4t_v2\configuration_seamless_m4t_v2.py # 设置文件编码为 UTF-8,确保支持中文等多种字符集 # 版权声明和许可证信息,声明此代码的版权及其使用条款 # 导入所需的模块和类 阅读全文
posted @ 2024-07-01 10:54 绝不原创的飞龙 阅读(10) 评论(0) 推荐(0) 编辑
摘要: Transformers 源码解析(一百零五) .\models\speech_encoder_decoder\convert_speech_to_text_wav2vec2_seq2seq_original_to_pytorch.py # coding=utf-8 # 上面是指定代码文件的编码格式 阅读全文
posted @ 2024-07-01 10:54 绝不原创的飞龙 阅读(18) 评论(0) 推荐(0) 编辑
摘要: Transformers 源码解析(一百零四) .\models\siglip\__init__.py # 引入必要的依赖和模块结构定义 from typing import TYPE_CHECKING # 从 HuggingFace 的 utils 模块中导入所需的工具和函数 from ...ut 阅读全文
posted @ 2024-07-01 10:53 绝不原创的飞龙 阅读(10) 评论(0) 推荐(0) 编辑
上一页 1 ··· 36 37 38 39 40 41 42 43 44 ··· 404 下一页