上一页 1 ··· 377 378 379 380 381 382 383 384 385 ··· 732 下一页
摘要: Transformers 源码解析(八十八) .\models\perceiver\tokenization_perceiver.py # coding=utf-8 # 版权 2021 年 HuggingFace Inc. 团队。 # # 根据 Apache 许可证版本 2.0 授权。 # 除非符合 阅读全文
posted @ 2024-06-29 15:48 绝不原创的飞龙 阅读(251) 评论(0) 推荐(0)
摘要: Transformers 源码解析(八十) .\models\mt5\modeling_tf_mt5.py # 设置文件编码为UTF-8 # 版权声明,指出代码的版权归属 # 版权使用协议,告知可在Apache License Version 2.0下使用 # 获取Apache License Ve 阅读全文
posted @ 2024-06-29 15:48 绝不原创的飞龙 阅读(141) 评论(0) 推荐(0)
摘要: Transformers 源码解析(八) .\modeling_tf_outputs.py # 导入警告模块,用于处理警告信息 import warnings # 导入数据类装饰器,用于定义数据类 from dataclasses import dataclass # 导入类型提示,用于类型注解 f 阅读全文
posted @ 2024-06-29 15:48 绝不原创的飞龙 阅读(633) 评论(0) 推荐(0)
摘要: Lucidrains 系列项目源码解析(一) .\lucidrains\Adan-pytorch\adan_pytorch\adan.py import math import torch from torch.optim import Optimizer # 定义一个函数,用于检查变量是否存在 d 阅读全文
posted @ 2024-06-28 14:15 绝不原创的飞龙 阅读(251) 评论(0) 推荐(0)
摘要: Lucidrains 系列项目源码解析(五十一) .\lucidrains\x-transformers\x_transformers\xval.py """ 定义了一个基于离散标记的常规变换器,但对于数字是连续的 更好地泛化了算术 https://arxiv.org/abs/2310.02989 阅读全文
posted @ 2024-06-28 14:14 绝不原创的飞龙 阅读(78) 评论(0) 推荐(0)
摘要: Lucidrains 系列项目源码解析(五十) .\lucidrains\x-clip\setup.py # 导入设置和查找包的函数 from setuptools import setup, find_packages # 设置包的信息 setup( # 包的名称 name = 'x-clip', 阅读全文
posted @ 2024-06-28 14:14 绝不原创的飞龙 阅读(153) 评论(0) 推荐(0)
摘要: Lucidrains 系列项目源码解析(五) .\lucidrains\byol-pytorch\byol_pytorch\trainer.py # 导入必要的库 from pathlib import Path import torch import torch.distributed as di 阅读全文
posted @ 2024-06-28 14:14 绝不原创的飞龙 阅读(118) 评论(0) 推荐(0)
摘要: Lucidrains 系列项目源码解析(四十一) .\lucidrains\soundstorm-pytorch\soundstorm_pytorch\trainer.py # 导入必要的模块 from pathlib import Path import re from shutil import 阅读全文
posted @ 2024-06-28 14:14 绝不原创的飞龙 阅读(60) 评论(0) 推荐(0)
摘要: Lucidrains 系列项目源码解析(四十五) .\lucidrains\triton-transformer\triton_transformer\cross_entropy.py # 导入 torch 库 import torch # 导入 torch 中的函数库 import torch.n 阅读全文
posted @ 2024-06-28 14:13 绝不原创的飞龙 阅读(216) 评论(0) 推荐(0)
摘要: Lucidrains 系列项目源码解析(四十四) .\lucidrains\toolformer-pytorch\toolformer_pytorch\tools.py # 导入所需的库 import os # 尝试导入所需的库,如果导入失败则输出错误信息并退出程序 try: # 从dotenv库中 阅读全文
posted @ 2024-06-28 14:13 绝不原创的飞龙 阅读(103) 评论(0) 推荐(0)
上一页 1 ··· 377 378 379 380 381 382 383 384 385 ··· 732 下一页