当前位置: 首页 > news >正文

自闭症网站的建设意义网站建设佰金手指科杰三

自闭症网站的建设意义,网站建设佰金手指科杰三,接网站建设的单子,网站建设与用户体验主题思想#xff1a; 正交基函数#xff0c; sin,cos 是通过网络训练得到的参数。 使用一维卷积核直接对于原始音频#xff0c;进行卷积生成语谱图#xff1b; 使用一维卷积核生成语谱图特征#xff0c; 不同于以往的方式#xff0c;正是因为这些正交基函数是通过卷积…主题思想 正交基函数 sin,cos 是通过网络训练得到的参数。 使用一维卷积核直接对于原始音频进行卷积生成语谱图 使用一维卷积核生成语谱图特征 不同于以往的方式正是因为这些正交基函数是通过卷积核构成的 由于这些卷积核的参数可训练的 这表明这些正交基是通过训练得来的 理论上是更容易适配好当前的任务 因为人为定义好的统一的正交基函数并不能自适应在当前的任务上 每个任务肯定自身对应的最好的正交基函数通过训练得来应该是恰当的 但是目前笔者实现下来 这种方式占用显存特别高。 基本上需要 24G 显存以上 多卡并行比较好实验 1. 使用神经网络生成语谱图的方式 现有的工作如下: 1.1 nnAudio nnAudio: An on-the-fly GPU Audio to Spectrogram Conversion Toolbox Using 1D Convolutional Neural Networks https://github.com/KinWaiCheuk/nnAudio 1.2 PANN PANNs: Large-Scale Pretrained Audio Neural Networks for Audio Pattern Recognition: 开源实现 https://github.com/qiuqiangkong/audioset_tagging_cnn; 此外,  使用torch 完成 librosa 函数中的功能 同样是基于神经网络 公布使用torch 中一维卷积核的方式生成语谱图的仓库 https://github.com/qiuqiangkong/torchlibrosa; 2. torch 实现的部分函数 下面实现的函数 在上面的开源仓库中也实现了 建议可以多阅读源码: 2.1 torch 实现power to db #note: 使用torch 实现 librosa 中的power_to_db 函数: # 将功率谱转换为对数谱 def power_to_db_torch(S, ref1.0, amin1e-10, top_db80.0):#note 使用断言的方式对输入检查if amin 0:raise ValueError( amin must be strictly positive)S torch.tensor(S)amin torch.tensor([amin])ref torch.abs(torch.tensor([ref]))log_spec 10.0 * torch.log10(torch.max(S, amin))log_spec - 10.0 * torch.log10(torch.max(amin, ref))if top_db is not None:if top_db 0:raise ValueError(top_db must be non-negative)max_val torch.max(log_spec)log_spec torch.maximum(log_spec, max_val - top_db)return log_spec 2.2 torch 实现 cv2.resize() # 使用torch, 对单通道的图片进行缩放 import torch.nn.functional as F def resize_torch_single_channel(img, resz, methodbilinear):# 函数的输入需要使用断言检查维度是否匹配assert len(img.shape) 2, Input image should have 2 dimension: (height, width)# 检查张量是否是张量形式if not isinstance(img, torch.Tensor):img torch.tensor(img).float()# 增加batch, channel 维度img img.unsqueeze(0).unsqueeze(0)height, width img.shape[2], img.shape[3]new_height, new_width int(height * resz), int(width * resz)if method bilinear:mode bilinearelse:raise ValueError(Unsupported interpolation method)# 使用torch 自带的线性插值函数 完成尺寸的缩放resized_img F.interpolate(img, size(new_height, new_width),modemode, align_cornersFalse)# remove the batch and channel dimresized_img resized_img.squeeze(0).squeeze(0)return resized_imgimport torch import torch.nn.functional as Fdef resize_torch(img, resz, methodbilinear):assert len(img.shape) 3, Input image should have 3 dimensions: (height, width, channels)# Convert the input image to a PyTorch tensor if its not already oneif not isinstance(img, torch.Tensor):img torch.tensor(img).float()# Convert the image from HWC to CHW formatimg img.permute(2, 0, 1).unsqueeze(0) # Add an extra dimension for the batchheight, width img.shape[2], img.shape[3]new_height, new_width int(height * resz), int(width * resz)if method bilinear:mode bilinearelse:raise ValueError(Unsupported interpolation method)# Resize the image using torch.nn.functional.interpolateresized_img F.interpolate(img, size(new_height, new_width), modemode, align_cornersFalse)# Convert the image back to HWC format and remove the batch dimensionresized_img resized_img.squeeze(0).permute(1, 2, 0)return resized_img
http://www.w-s-a.com/news/709038/

相关文章:

  • 免费网站服务陕西省咸阳市建设银行网站
  • 网站建设活动计划做网站意义
  • 莱芜新闻主持人名单seo sem 外贸建站 网站建设 文化墙设计
  • 易语言可以做网站嘛赣州网站建设开发
  • 网站建设规范布局网站建设费往什么科目
  • 乐清手机网站设计哪个汽车网站汽贸店免费做
  • 网站建设课程总结报告推广软文
  • 企业网站哪里可以做烟台seo网站推广
  • 怎样建设网站优化珠海网站建设开发
  • 泰兴住房和城乡建设厅网站福州app开发
  • 免费制作公司网站seo前线
  • 导购网站怎么推广有网站源码怎么搭建网站
  • 网站开发问题杭州制作公司网站
  • 网站推广seo是什么wordpress 去除顶部
  • 建筑学不会画画影响大吗电子商务沙盘seo关键词
  • 重庆网站建设找承越上海建设工程招投标网
  • 网站建设四个步骤下单的网站建设教程
  • 网站建设合同的验收表响应式网站建设哪家好
  • 手机网站建设视频长沙百家号seo
  • 网站未备案怎么访问网站开发前端需要学什么
  • 正黄集团博弘建设官方网站wordpress设置固定链接和伪静态
  • wordpress 建网站视频如何实现网站生成网页
  • 杭州品牌网站建设推广个人的网站建设目标
  • 济南有哪些网站是做家具团购的贸易公司自建免费网站
  • wap网站psd成立公司在什么网站
  • 网站建设婚恋交友聊城网站建设费用
  • 沈阳网站建设联系方式尉氏县金星网架公司
  • 医院网站建设实施方案基础微网站开发信息
  • 网站建设开发服务费记账百度指数搜索
  • 网站建设备案流程windows优化大师有必要安装吗