o
    ߥi                     @   sN   d dl Z d dlZd dlZd dlmZ dd Zee jG dd dej	Z
dS )    Nc                 C   s:   t jt jt jd t| }|dd}|dd}d| S )zp function that transform as str numpy mat to standard kaldi str matrix

    Args:
        np_mat: numpy mat
    )	threshold	linewidth[ ]z[ %s ]
)npset_printoptionsinfnanstrreplace)np_matout_str r   a/home/ubuntu/.local/lib/python3.10/site-packages/modelscope/models/audio/ans/layers/layer_base.pyto_kaldi_matrix
   s
   r   c                       s*   e Zd Z fddZejdd Z  ZS )	LayerBasec                    s   t t|   d S N)superr   __init__self	__class__r   r   r      s   zLayerBase.__init__c                 C   s   d S r   r   r   r   r   r   to_kaldi_nnet   s   zLayerBase.to_kaldi_nnet)__name__
__module____qualname__r   abcabstractmethodr   __classcell__r   r   r   r   r      s    r   )r   numpyr   sixtorch.nnnnr   add_metaclassABCMetaModuler   r   r   r   r   <module>   s   
