Attention-based Seq2seq 实现一个分类的任务
来自:Effective Approaches to Attention-based Neural Machine Translation
import torch
import torch.nn as nn
import torch.nn.functional as F
#以离散符号的分类任务为例,实现基于注意力机制的Seq2Seq模型
class Seq2SeqEncoder(nn.Module):
Attention-based Seq2seq 实现一个分类的任务
来自:Effective Approaches to Attention-based Neural Machine Translation
import torch
import torch.nn as nn
import torch.nn.functional as F
#以离散符号的分类任务为例,实现基于注意力机制的Seq2Seq模型
class Seq2SeqEncoder(nn.Module):