Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
N
NiuTrans.Tensor
概览
Overview
Details
Activity
Cycle Analytics
版本库
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
问题
8
Issues
8
列表
Board
标记
里程碑
合并请求
0
Merge Requests
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
Snippets
成员
Collapse sidebar
Close sidebar
活动
图像
聊天
创建新问题
作业
提交
Issue Boards
Open sidebar
NiuTrans
NiuTrans.Tensor
Commits
f1ba270a
Commit
f1ba270a
authored
Mar 30, 2019
by
xiaotong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add name of the layer
parent
0bdd9984
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
17 行增加
和
4 行删除
+17
-4
source/sample/transformer/T2TDecoder.cpp
+2
-0
source/sample/transformer/T2TDecoder.h
+4
-2
source/sample/transformer/T2TEncoder.cpp
+3
-0
source/sample/transformer/T2TEncoder.h
+3
-0
source/sample/transformer/T2TOutput.cpp
+2
-0
source/sample/transformer/T2TOutput.h
+3
-2
没有找到文件。
source/sample/transformer/T2TDecoder.cpp
查看文件 @
f1ba270a
...
...
@@ -159,6 +159,8 @@ XTensor AttDecoder::Make(XTensor &inputDec, XTensor &outputEnc, XTensor &mask, X
/* layer normalization */
x
=
fnnLayerNorms
[
i
].
Make
(
res
);
}
x
.
SetName
(
DECODING_NAME
);
return
x
;
}
...
...
source/sample/transformer/T2TDecoder.h
查看文件 @
f1ba270a
...
...
@@ -26,6 +26,9 @@
namespace
transformer
{
#define DECODING_NAME "decoding"
#define DECODING_INPUT_NAME "decoding_input"
class
AttDecoder
{
...
...
@@ -100,4 +103,4 @@ public:
}
#endif
\ No newline at end of file
#endif
source/sample/transformer/T2TEncoder.cpp
查看文件 @
f1ba270a
...
...
@@ -139,6 +139,9 @@ XTensor AttEncoder::Make(XTensor &input, XTensor &mask, XTensor &maskEncDec, boo
/* layer normalization */
x
=
fnnLayerNorms
[
i
].
Make
(
res
);
}
x
.
SetName
(
ENCODING_NAME
);
input
.
SetName
(
ENCODING_INPUT_NAME
);
return
x
;
}
...
...
source/sample/transformer/T2TEncoder.h
查看文件 @
f1ba270a
...
...
@@ -32,6 +32,9 @@ using namespace nts;
namespace
transformer
{
#define ENCODING_NAME "encoding"
#define ENCODING_INPUT_NAME "encoding_input"
/*
base class of the encoder
...
...
source/sample/transformer/T2TOutput.cpp
查看文件 @
f1ba270a
...
...
@@ -95,6 +95,8 @@ void T2TOutput::Make(XTensor &input, XTensor &output)
output
=
LogSoftmax
(
MMul
(
x
,
w
),
-
1
);
//output = Softmax(MMul(x, w), -1);
output
.
SetName
(
OUTPUT_NAME
);
}
}
source/sample/transformer/T2TOutput.h
查看文件 @
f1ba270a
...
...
@@ -28,6 +28,8 @@ using namespace nts;
namespace
transformer
{
#define OUTPUT_NAME "output"
/* output layer */
class
T2TOutput
...
...
@@ -71,4 +73,4 @@ public:
}
#endif
\ No newline at end of file
#endif
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论