cuda经纱rnn传感器的pytorch绑定

warp-rnnt的Python项目详细描述


CUDA经纱RNN传感器的Pythorch绑定

defrnnt_loss(log_probs,# type: torch.FloatTensorlabels,# type: torch.IntTensorframes_lengths,# type: torch.IntTensorlabels_lengths,# type: torch.IntTensoraverage_frames=False,# type: boolreduction=None,# type: Optional[AnyStr]blank=0,# type: int):"""The CUDA-Warp RNN-Transducer loss.    Args:      log_probs (torch.Tensor): Input tensor (float) with shape        (T, N, U, V) where T is the maximum number of input frames, N is the        minibatch size, U is the maximum number of output labels and V is        the vocabulary of labels (including the blank).      labels (torch.IntTensor): Tensor with shape (N, U-1) representing the        reference labels for all samples in the minibatch.      frames_lengths (torch.IntTensor): Tensor with shape (N,) representing the        number of frames for each sample in the minibatch.      labels_lengths (torch.IntTensor): Tensor with shape (N,) representing the        length of the transcription for each sample in the minibatch.      average_frames (bool, optional): Specifies whether the loss of each        sample should be divided by its number of frames. Default: ``False''.      reduction (string, optional): Specifies the type of reduction.        Default: None.      blank (int, optional): label used to represent the blank symbol.        Default: 0.    """# type: (...) -> torch.Tensor

要求

    C++ 11编译器(用GCC 5.4进行测试)。
  • python:3.5、3.6、3.7(用3.6版测试)。
  • PyTorch>;=1.0.0(使用版本1.1.0测试)。
  • CUDA Toolkit(使用10.0版测试)。

安装

目前,没有该包的编译版本。以下安装说明从本地源代码编译包。

来自Pypi

pip install warp_rnnt

来自github

git clone https://github.com/1ytic/warp-rnnt
cd warp-rnnt/pytorch_binding
python setup.py install

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java为jboss/KeyClope设置ssl/https   java理解Spring引导中的@ModelAttribute和@RequestMapping   安卓 Firebase空对象引用“long java.lang.long.longValue()”   java绑定不匹配:类型A不是TestService类型<T>   java如何分割彩色线?   java Android应用程序只能在一台设备上冻结,而且有时也会冻结。(带输出)   java安卓使用Jackson库:如何加载索引范围从到的对象   收集与多个AWS服务交互的Java应用程序的性能指标   更多关于Java中的Random:获得几乎真正的随机化   java如何检查时间戳是否为10分钟?   Spring调度器/执行器的java AOP特性   java线程。睡眠使我的应用程序崩溃   Java Stream GroupingBy collect在自定义对象中   java有一个队列订阅多个队列,ProgramMaticali   查看/写入数据库SQLite时发生java致命异常?   java setRepeating()函数工作不正常(AlarmManger Android)   java查询hibernate中向manager报告的总人数   java为什么Firebase实时数据库未更新?