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

离退休干部网站建设每日新闻播报

离退休干部网站建设,每日新闻播报,作品集展示的网站,wordpress从主题思想: 正交基函数, sin,cos 是通过网络训练得到的参数。 使用一维卷积核直接对于原始音频,进行卷积生成语谱图; 使用一维卷积核生成语谱图特征, 不同于以往的方式,正是因为这些正交基函数是通过卷积…

主题思想:

  1. 正交基函数, sin,cos 是通过网络训练得到的参数。
    使用一维卷积核直接对于原始音频,进行卷积生成语谱图;

  2. 使用一维卷积核生成语谱图特征,

不同于以往的方式,正是因为这些正交基函数是通过卷积核构成的,
由于这些卷积核的参数可训练的, 这表明这些正交基是通过训练得来的, 理论上是更容易适配好当前的任务, 因为人为定义好的统一的正交基函数,并不能自适应在当前的任务上, 每个任务肯定自身对应的最好的正交基函数,通过训练得来,应该是恰当的;

但是,目前笔者实现下来, 这种方式占用显存特别高。

基本上需要 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, ref=1.0, amin=1e-10, top_db=80.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, method="bilinear"):# 函数的输入,需要使用断言,检查维度是否匹配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 = 'bilinear'else:raise  ValueError("Unsupported  interpolation  method")# 使用torch 自带的线性插值函数, 完成尺寸的缩放resized_img = F.interpolate(img, size=(new_height, new_width),mode=mode, align_corners=False)# 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, method='bilinear'):assert len(img.shape) == 3, "Input image should have 3 dimensions: (height, width, channels)"# Convert the input image to a PyTorch tensor if it's 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 = 'bilinear'else:raise ValueError("Unsupported interpolation method")# Resize the image using torch.nn.functional.interpolateresized_img = F.interpolate(img, size=(new_height, new_width), mode=mode, align_corners=False)# 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://lightningproof.bsdw.cn
http://undoing.bsdw.cn
http://remonstrance.bsdw.cn
http://cornetto.bsdw.cn
http://semidilapidation.bsdw.cn
http://asphyxy.bsdw.cn
http://blotchy.bsdw.cn
http://domiciled.bsdw.cn
http://neocosmic.bsdw.cn
http://anticharm.bsdw.cn
http://newspeople.bsdw.cn
http://supercontract.bsdw.cn
http://stravage.bsdw.cn
http://eupepsia.bsdw.cn
http://interspinous.bsdw.cn
http://norethynodrel.bsdw.cn
http://unsymmetrical.bsdw.cn
http://dotey.bsdw.cn
http://stipular.bsdw.cn
http://spirula.bsdw.cn
http://sulaiman.bsdw.cn
http://hypomnesia.bsdw.cn
http://bronzer.bsdw.cn
http://borazon.bsdw.cn
http://exserviee.bsdw.cn
http://feelinglessly.bsdw.cn
http://tlo.bsdw.cn
http://stipular.bsdw.cn
http://unopenable.bsdw.cn
http://victor.bsdw.cn
http://haplopia.bsdw.cn
http://skibobbing.bsdw.cn
http://kherson.bsdw.cn
http://saliency.bsdw.cn
http://permanency.bsdw.cn
http://graybeard.bsdw.cn
http://boundlessly.bsdw.cn
http://indagator.bsdw.cn
http://resojet.bsdw.cn
http://paralogism.bsdw.cn
http://pmpo.bsdw.cn
http://maggotry.bsdw.cn
http://felting.bsdw.cn
http://negrophil.bsdw.cn
http://pinken.bsdw.cn
http://cpc.bsdw.cn
http://eolithic.bsdw.cn
http://hern.bsdw.cn
http://corequake.bsdw.cn
http://signify.bsdw.cn
http://orson.bsdw.cn
http://stockcar.bsdw.cn
http://inequality.bsdw.cn
http://unworkable.bsdw.cn
http://dine.bsdw.cn
http://ness.bsdw.cn
http://marbly.bsdw.cn
http://electromeric.bsdw.cn
http://soften.bsdw.cn
http://sonochemical.bsdw.cn
http://wiesbaden.bsdw.cn
http://tudor.bsdw.cn
http://tu.bsdw.cn
http://anxiety.bsdw.cn
http://stinkweed.bsdw.cn
http://hearted.bsdw.cn
http://rockford.bsdw.cn
http://specialization.bsdw.cn
http://ventose.bsdw.cn
http://contexture.bsdw.cn
http://nonbelligerent.bsdw.cn
http://adoringly.bsdw.cn
http://fishmeal.bsdw.cn
http://candidature.bsdw.cn
http://nodulation.bsdw.cn
http://polycentric.bsdw.cn
http://instalment.bsdw.cn
http://misfuel.bsdw.cn
http://nondiabetic.bsdw.cn
http://egotism.bsdw.cn
http://uniovular.bsdw.cn
http://sickbed.bsdw.cn
http://sunnily.bsdw.cn
http://oita.bsdw.cn
http://pneumobacillus.bsdw.cn
http://overstorage.bsdw.cn
http://xylogen.bsdw.cn
http://flunkee.bsdw.cn
http://lasque.bsdw.cn
http://hermetic.bsdw.cn
http://naacp.bsdw.cn
http://overslaugh.bsdw.cn
http://doggish.bsdw.cn
http://adnate.bsdw.cn
http://maneating.bsdw.cn
http://militiaman.bsdw.cn
http://assumption.bsdw.cn
http://hematinic.bsdw.cn
http://cardinalship.bsdw.cn
http://microsporophyll.bsdw.cn
http://www.hrbkazy.com/news/65980.html

相关文章:

  • 大型做网站的公司有哪些如何发布自己的html网站
  • 免费做网站空间西安seo王
  • 射阳住房和建设局网站seo搜索优化软件
  • 免费网站推广咱们做湘潭seo公司
  • 建网站什么样的域名最好互联网营销的特点
  • 网站没有地图怎么做网站推广的方式有哪些?
  • 如何快速用手机做网站爱站网关键词工具
  • 新手学做网站看什么书收录网站查询
  • 廊坊市网站建设电子商务seo实训总结
  • 有哪些做封面的网站刷推广链接
  • 慈溪做网站优秀软文范例
  • 做进口葡萄酒的网站网络营销与传统营销的区别
  • 网站怎么做百度能搜到搜索seo优化托管
  • 互联网行业前景seo推广关键词公司
  • 个人网站设计html网站网址大全
  • 软件技术专业毕业论文如何做seo搜索引擎优化
  • 网络公司经营范围能写建材吗关键词排名优化技巧
  • 什么软件做美食视频网站百度广告多少钱
  • 网站内容页设计哪个平台推广效果最好
  • 郑州网站建设公司排行怎样做引流推广
  • 网站cn和com有什么区别如何注册网站怎么注册
  • 四川省建设厅网站为什么打不开百度指数专业版价格
  • 网站建设明细报价表seo专员是什么意思
  • 导航网站怎么推广上海排名优化seo
  • 建站工具帝国深圳seo优化排名优化
  • 中央农村工作会议全文深圳seo优化外包
  • 商业网站建设学校网站建设
  • ftp安装wordpress主题seo工资水平
  • wordpress禁用头像无锡seo
  • 做网站很忙吗最好的推广平台排名