Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
B
BiTransDPI
概览
概览
详情
活动
周期分析
版本库
存储库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
CI / CD
CI / CD
流水线
日程表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
提交
问题看板
Open sidebar
杨志辉
BiTransDPI
Commits
ef8fe61a
提交
ef8fe61a
authored
4月 01, 2021
作者:
朱学凯
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
change config to paper
上级
94d0c84d
隐藏空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
80 行增加
和
13 行删除
+80
-13
workspace.xml
.idea/workspace.xml
+64
-2
config.json
config/config.json
+2
-2
config_layer_3.json
config/config_layer_3.json
+2
-2
events.out.tfevents.1617283406.DESKTOP-K4GGDLG.1656.0
...ain/events.out.tfevents.1617283406.DESKTOP-K4GGDLG.1656.0
+0
-0
events.out.tfevents.1617283575.DESKTOP-K4GGDLG.15080.0
...in/events.out.tfevents.1617283575.DESKTOP-K4GGDLG.15080.0
+0
-0
events.out.tfevents.1617283616.DESKTOP-K4GGDLG.14676.0
...in/events.out.tfevents.1617283616.DESKTOP-K4GGDLG.14676.0
+0
-0
modeling_bert.py
modeling_bert.py
+1
-0
run_interaction.py
run_interaction.py
+9
-5
train.sh
train.sh
+2
-2
没有找到文件。
.idea/workspace.xml
浏览文件 @
ef8fe61a
...
...
@@ -3,6 +3,11 @@
<component
name=
"ChangeListManager"
>
<list
default=
"true"
id=
"b4fb7f33-5387-4628-bcdb-b1b79dd926d0"
name=
"Default Changelist"
comment=
""
>
<change
beforePath=
"$PROJECT_DIR$/.idea/workspace.xml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/.idea/workspace.xml"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/config/config.json"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/config/config.json"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/config/config_layer_3.json"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/config/config_layer_3.json"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/modeling_bert.py"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/modeling_bert.py"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/run_interaction.py"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/run_interaction.py"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/train.sh"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/train.sh"
afterDir=
"false"
/>
</list>
<option
name=
"SHOW_DIALOG"
value=
"false"
/>
<option
name=
"HIGHLIGHT_CONFLICTS"
value=
"true"
/>
...
...
@@ -21,13 +26,44 @@
<property
name=
"RunOnceActivity.OpenProjectViewOnStart"
value=
"true"
/>
<property
name=
"RunOnceActivity.ShowReadmeOnStart"
value=
"true"
/>
<property
name=
"WebServerToolWindowFactoryState"
value=
"false"
/>
<property
name=
"restartRequiresConfirmation"
value=
"false"
/>
</component>
<component
name=
"RecentsManager"
>
<key
name=
"MoveFile.RECENT_KEYS"
>
<recent
name=
"E:\CPI\project\CPI\log\lr-5e-6-batch-30-layer3"
/>
<recent
name=
"E:\CPI\project\CPI"
/>
<recent
name=
"E:\CPI\project\CPI\config"
/>
<recent
name=
"E:\CPI\project\CPI\log\lr-5e-6-batch-30-layer3"
/>
</key>
</component>
<component
name=
"RunManager"
>
<configuration
name=
"run_interaction"
type=
"PythonConfigurationType"
factoryName=
"Python"
temporary=
"true"
nameIsGenerated=
"true"
>
<module
name=
"CPI"
/>
<option
name=
"INTERPRETER_OPTIONS"
value=
""
/>
<option
name=
"PARENT_ENVS"
value=
"true"
/>
<envs>
<env
name=
"PYTHONUNBUFFERED"
value=
"1"
/>
</envs>
<option
name=
"SDK_HOME"
value=
""
/>
<option
name=
"WORKING_DIRECTORY"
value=
"$PROJECT_DIR$"
/>
<option
name=
"IS_MODULE_SDK"
value=
"true"
/>
<option
name=
"ADD_CONTENT_ROOTS"
value=
"true"
/>
<option
name=
"ADD_SOURCE_ROOTS"
value=
"true"
/>
<EXTENSION
ID=
"PythonCoverageRunConfigurationExtension"
runner=
"coverage.py"
/>
<option
name=
"SCRIPT_NAME"
value=
"$PROJECT_DIR$/run_interaction.py"
/>
<option
name=
"PARAMETERS"
value=
""
/>
<option
name=
"SHOW_COMMAND_LINE"
value=
"false"
/>
<option
name=
"EMULATE_TERMINAL"
value=
"false"
/>
<option
name=
"MODULE_MODE"
value=
"false"
/>
<option
name=
"REDIRECT_INPUT"
value=
"false"
/>
<option
name=
"INPUT_FILE"
value=
""
/>
<method
v=
"2"
/>
</configuration>
<recent_temporary>
<list>
<item
itemvalue=
"Python.run_interaction"
/>
</list>
</recent_temporary>
</component>
<component
name=
"SpellCheckerSettings"
RuntimeDictionaries=
"0"
Folders=
"0"
CustomDictionaries=
"0"
DefaultDictionary=
"application-level"
UseSingleDictionary=
"true"
transferred=
"true"
/>
<component
name=
"TaskManager"
>
<task
active=
"true"
id=
"Default"
summary=
"Default task"
>
...
...
@@ -36,11 +72,36 @@
<option
name=
"number"
value=
"Default"
/>
<option
name=
"presentableId"
value=
"Default"
/>
<updated>
1617112323231
</updated>
<workItem
from=
"1617112324809"
duration=
"
417
0000"
/>
<workItem
from=
"1617112324809"
duration=
"
1045
0000"
/>
</task>
<servers
/>
</component>
<component
name=
"TypeScriptGeneratedFilesManager"
>
<option
name=
"version"
value=
"3"
/>
</component>
<component
name=
"Vcs.Log.Tabs.Properties"
>
<option
name=
"TAB_STATES"
>
<map>
<entry
key=
"MAIN"
>
<value>
<State
/>
</value>
</entry>
</map>
</option>
</component>
<component
name=
"XDebuggerManager"
>
<breakpoint-manager>
<breakpoints>
<line-breakpoint
enabled=
"true"
suspend=
"THREAD"
type=
"python-line"
>
<url>
file://$PROJECT_DIR$/modeling_bert.py
</url>
<line>
1989
</line>
<option
name=
"timeStamp"
value=
"1"
/>
</line-breakpoint>
</breakpoints>
</breakpoint-manager>
</component>
<component
name=
"com.intellij.coverage.CoverageDataManagerImpl"
>
<SUITE
FILE_PATH=
"coverage/CPI$run_interaction.coverage"
NAME=
"run_interaction Coverage Results"
MODIFIED=
"1617283608264"
SOURCE_PROVIDER=
"com.intellij.coverage.DefaultCoverageFileProvider"
RUNNER=
"coverage.py"
COVERAGE_BY_TEST_ENABLED=
"true"
COVERAGE_TRACING_ENABLED=
"false"
WORKING_DIRECTORY=
"$PROJECT_DIR$"
/>
</component>
</project>
\ No newline at end of file
config/config.json
浏览文件 @
ef8fe61a
...
...
@@ -7,12 +7,12 @@
"hidden_dropout_prob"
:
0.1
,
"hidden_size"
:
768
,
"initializer_range"
:
0.02
,
"intermediate_size"
:
3072
,
"intermediate_size"
:
1536
,
"layer_norm_eps"
:
1e-12
,
"max_position_embeddings"
:
512
,
"model_type"
:
"bert"
,
"num_attention_heads"
:
12
,
"num_hidden_layers"
:
12
,
"num_hidden_layers"
:
3
,
"pad_token_id"
:
0
,
"type_vocab_size"
:
2
,
"vocab_size"
:
23615
...
...
config/config_layer_3.json
浏览文件 @
ef8fe61a
...
...
@@ -5,9 +5,9 @@
"attention_probs_dropout_prob"
:
0.1
,
"hidden_act"
:
"gelu"
,
"hidden_dropout_prob"
:
0.1
,
"hidden_size"
:
768
,
"hidden_size"
:
384
,
"initializer_range"
:
0.02
,
"intermediate_size"
:
3072
,
"intermediate_size"
:
1536
,
"layer_norm_eps"
:
1e-12
,
"max_position_embeddings"
:
512
,
"model_type"
:
"bert"
,
...
...
log/train/events.out.tfevents.1617283406.DESKTOP-K4GGDLG.1656.0
0 → 100644
浏览文件 @
ef8fe61a
File added
log/train/events.out.tfevents.1617283575.DESKTOP-K4GGDLG.15080.0
0 → 100644
浏览文件 @
ef8fe61a
File added
log/train/events.out.tfevents.1617283616.DESKTOP-K4GGDLG.14676.0
0 → 100644
浏览文件 @
ef8fe61a
File added
modeling_bert.py
浏览文件 @
ef8fe61a
...
...
@@ -1986,6 +1986,7 @@ class BertAffinityModel(BertPreTrainedModel):
inputs_embeds
=
inputs_embeds
,
past_key_values_length
=
past_key_values_length
,
)
print
(
embedding_output
.
size
())
encoder_outputs
=
self
.
encoder
(
embedding_output
,
attention_mask
=
extended_attention_mask
,
...
...
run_interaction.py
浏览文件 @
ef8fe61a
...
...
@@ -64,12 +64,16 @@ def main(args):
for
epoch
in
range
(
args
.
epochs
):
for
i
,
(
input
,
affinity
)
in
enumerate
(
data_generator
):
# use cuda
#
if torch.cuda.is_available():
#
input.cuda()
#
affinity.cuda()
#
if torch.cuda.is_available():
#
input.cuda()
#
affinity.cuda()
# input model
pred_affinity
=
model
(
input
.
cuda
()
.
long
())
loss
=
loss_fct
(
pred_affinity
,
affinity
.
cuda
()
.
unsqueeze
(
-
1
))
if
torch
.
cuda
.
is_available
():
pred_affinity
=
model
(
input
.
cuda
()
.
long
())
loss
=
loss_fct
(
pred_affinity
,
affinity
.
cuda
()
.
unsqueeze
(
-
1
))
else
:
pred_affinity
=
model
(
input
.
long
())
loss
=
loss_fct
(
pred_affinity
,
affinity
.
unsqueeze
(
-
1
))
writer
.
add_scalar
(
'loss'
,
loss
,
num_step
)
# Update gradient
opt
.
zero_grad
()
...
...
train.sh
浏览文件 @
ef8fe61a
CUDA_VISIBLE_DEVICES
=
3 python run_interaction.py
--b
=
30
--task
=
train
--epochs
=
10
--lr
=
5e-5
--savedir
=
lr-5e-5-batch-30-layer3
--config
=
./config/config_layer_3.json
\ No newline at end of file
CUDA_VISIBLE_DEVICES
=
1 python run_interaction.py
--b
=
64
--task
=
train
--epochs
=
10
--lr
=
1e-7
--savedir
=
lr-1e-7-batch-64-layer3
--config
=
./config/config_layer_3.json
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论