摘要:
import os import pickle from tqdm import tqdm from config import wav_folder, transcript_file, pickle_file from utils import ensure_folder def get_data 阅读全文
posted @ 2021-10-19 19:48
Uriel-w
阅读(104)
评论(0)
推荐(0)
摘要:
import torch.nn as nn from .decoder import Decoder from .encoder import Encoder class Transformer(nn.Module): #定义类,继承父类nn.Module """An encoder-decoder 阅读全文
posted @ 2021-10-19 19:46
Uriel-w
阅读(138)
评论(0)
推荐(0)
摘要:
import torch import torch.nn as nn import torch.nn.functional as F from config import IGNORE_ID from .attention import MultiHeadAttention from .module 阅读全文
posted @ 2021-10-19 19:46
Uriel-w
阅读(183)
评论(0)
推荐(0)
摘要:
import numpy as np import torch import torch.nn as nn class MultiHeadAttention(nn.Module): ''' Multi-Head Attention module ''' def __init__(self, n_he 阅读全文
posted @ 2021-10-19 19:45
Uriel-w
阅读(77)
评论(0)
推荐(0)
摘要:
import torch.nn as nn from .attention import MultiHeadAttention #引进多头注意力模块 from .module import PositionalEncoding, PositionwiseFeedForward #位置编码和前馈网络 阅读全文
posted @ 2021-10-19 19:44
Uriel-w
阅读(233)
评论(0)
推荐(0)
摘要:
import numpy as np import torch # from torch.utils.tensorboard import SummaryWriter import torch.nn as nn import argparse from tqdm import tqdm from c 阅读全文
posted @ 2021-10-19 19:42
Uriel-w
阅读(199)
评论(0)
推荐(0)

浙公网安备 33010602011771号