Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
models
提交
26594a1f
M
models
项目概览
PaddlePaddle
/
models
大约 1 年 前同步成功
通知
222
Star
6828
Fork
2962
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
602
列表
看板
标记
里程碑
合并请求
255
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
models
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
602
Issue
602
列表
看板
标记
里程碑
合并请求
255
合并请求
255
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
26594a1f
编写于
1月 31, 2019
作者:
S
SunGaofeng
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
remove reader and metrics from nextvlad stnet tsn
上级
1047f81c
变更
12
隐藏空白更改
内联
并排
Showing
12 changed file
with
9 addition
and
90 deletion
+9
-90
fluid/PaddleCV/video/models/nextvlad/nextvlad.py
fluid/PaddleCV/video/models/nextvlad/nextvlad.py
+0
-18
fluid/PaddleCV/video/models/stnet/stnet.py
fluid/PaddleCV/video/models/stnet/stnet.py
+0
-31
fluid/PaddleCV/video/models/tsn/tsn.py
fluid/PaddleCV/video/models/tsn/tsn.py
+0
-31
fluid/PaddleCV/video/scripts/infer/infer_nextvlad.sh
fluid/PaddleCV/video/scripts/infer/infer_nextvlad.sh
+1
-1
fluid/PaddleCV/video/scripts/infer/infer_stnet.sh
fluid/PaddleCV/video/scripts/infer/infer_stnet.sh
+1
-1
fluid/PaddleCV/video/scripts/infer/infer_tsn.sh
fluid/PaddleCV/video/scripts/infer/infer_tsn.sh
+1
-1
fluid/PaddleCV/video/scripts/test/test_nextvlad.sh
fluid/PaddleCV/video/scripts/test/test_nextvlad.sh
+1
-1
fluid/PaddleCV/video/scripts/test/test_stnet.sh
fluid/PaddleCV/video/scripts/test/test_stnet.sh
+1
-1
fluid/PaddleCV/video/scripts/test/test_tsn.sh
fluid/PaddleCV/video/scripts/test/test_tsn.sh
+1
-1
fluid/PaddleCV/video/scripts/train/train_nextvlad.sh
fluid/PaddleCV/video/scripts/train/train_nextvlad.sh
+1
-2
fluid/PaddleCV/video/scripts/train/train_stnet.sh
fluid/PaddleCV/video/scripts/train/train_stnet.sh
+1
-1
fluid/PaddleCV/video/scripts/train/train_tsn.sh
fluid/PaddleCV/video/scripts/train/train_tsn.sh
+1
-1
未找到文件。
fluid/PaddleCV/video/models/nextvlad/nextvlad.py
浏览文件 @
26594a1f
...
...
@@ -58,7 +58,6 @@ class NEXTVLAD(ModelBase):
# other params
self
.
batch_size
=
self
.
get_config_from_sec
(
self
.
mode
,
'batch_size'
)
self
.
list
=
self
.
get_config_from_sec
(
self
.
mode
,
'filelist'
)
def
build_input
(
self
,
use_pyreader
=
True
):
rgb_shape
=
[
self
.
video_feature_size
]
...
...
@@ -148,23 +147,6 @@ class NEXTVLAD(ModelBase):
self
.
label_input
]
def
create_dataset_args
(
self
):
dataset_args
=
{}
dataset_args
[
'num_classes'
]
=
self
.
num_classes
if
self
.
use_gpu
and
self
.
py_reader
:
dataset_args
[
'batch_size'
]
=
int
(
self
.
batch_size
/
self
.
num_gpus
)
else
:
dataset_args
[
'batch_size'
]
=
self
.
batch_size
dataset_args
[
'list'
]
=
self
.
list
dataset_args
[
'eigen_file'
]
=
self
.
eigen_file
return
dataset_args
def
create_metrics_args
(
self
):
metrics_args
=
{}
metrics_args
[
'num_classes'
]
=
self
.
num_classes
metrics_args
[
'topk'
]
=
20
return
metrics_args
def
get_learning_rate_decay_list
(
base_learning_rate
,
decay
,
max_iter
,
decay_examples
,
total_batch_size
):
...
...
fluid/PaddleCV/video/models/stnet/stnet.py
浏览文件 @
26594a1f
...
...
@@ -26,7 +26,6 @@ class STNET(ModelBase):
self
.
get_config
()
def
get_config
(
self
):
self
.
format
=
self
.
get_config_from_sec
(
'model'
,
'format'
)
self
.
num_classes
=
self
.
get_config_from_sec
(
'model'
,
'num_classes'
)
self
.
seg_num
=
self
.
get_config_from_sec
(
'model'
,
'seg_num'
)
self
.
seglen
=
self
.
get_config_from_sec
(
'model'
,
'seglen'
)
...
...
@@ -43,16 +42,9 @@ class STNET(ModelBase):
self
.
l2_weight_decay
=
self
.
get_config_from_sec
(
'train'
,
'l2_weight_decay'
)
self
.
momentum
=
self
.
get_config_from_sec
(
'train'
,
'momentum'
)
self
.
use_gpu
=
self
.
get_config_from_sec
(
'train'
,
'use_gpu'
)
self
.
num_gpus
=
self
.
get_config_from_sec
(
'train'
,
'num_gpus'
)
self
.
short_size
=
self
.
get_config_from_sec
(
self
.
mode
,
'short_size'
)
self
.
target_size
=
self
.
get_config_from_sec
(
self
.
mode
,
'target_size'
)
self
.
num_reader_threads
=
self
.
get_config_from_sec
(
self
.
mode
,
'num_reader_threads'
)
self
.
buf_size
=
self
.
get_config_from_sec
(
self
.
mode
,
'buf_size'
)
self
.
batch_size
=
self
.
get_config_from_sec
(
self
.
mode
,
'batch_size'
)
self
.
filelist
=
self
.
get_config_from_sec
(
self
.
mode
,
'filelist'
)
def
build_input
(
self
,
use_pyreader
=
True
):
image_shape
=
[
3
,
self
.
target_size
,
self
.
target_size
]
...
...
@@ -130,29 +122,6 @@ class STNET(ModelBase):
self
.
label_input
]
def
create_dataset_args
(
self
):
cfg
=
{}
cfg
[
'format'
]
=
self
.
format
cfg
[
'num_classes'
]
=
self
.
num_classes
cfg
[
'seg_num'
]
=
self
.
seg_num
cfg
[
'seglen'
]
=
self
.
seglen
cfg
[
'short_size'
]
=
self
.
short_size
cfg
[
'target_size'
]
=
self
.
target_size
cfg
[
'num_reader_threads'
]
=
self
.
num_reader_threads
cfg
[
'buf_size'
]
=
self
.
buf_size
cfg
[
'image_mean'
]
=
self
.
image_mean
cfg
[
'image_std'
]
=
self
.
image_std
cfg
[
'list'
]
=
self
.
filelist
if
(
self
.
use_gpu
)
and
(
self
.
py_reader
is
not
None
):
cfg
[
'batch_size'
]
=
int
(
self
.
batch_size
/
self
.
num_gpus
)
else
:
cfg
[
'batch_size'
]
=
self
.
batch_size
return
cfg
def
create_metrics_args
(
self
):
return
{}
def
load_pretrain_params
(
self
,
exe
,
pretrain
,
prog
):
def
is_parameter
(
var
):
if
isinstance
(
var
,
fluid
.
framework
.
Parameter
):
...
...
fluid/PaddleCV/video/models/tsn/tsn.py
浏览文件 @
26594a1f
...
...
@@ -27,7 +27,6 @@ class TSN(ModelBase):
self
.
get_config
()
def
get_config
(
self
):
self
.
format
=
self
.
get_config_from_sec
(
'model'
,
'format'
)
self
.
num_classes
=
self
.
get_config_from_sec
(
'model'
,
'num_classes'
)
self
.
seg_num
=
self
.
get_config_from_sec
(
'model'
,
'seg_num'
)
self
.
seglen
=
self
.
get_config_from_sec
(
'model'
,
'seglen'
)
...
...
@@ -44,16 +43,9 @@ class TSN(ModelBase):
self
.
l2_weight_decay
=
self
.
get_config_from_sec
(
'train'
,
'l2_weight_decay'
)
self
.
momentum
=
self
.
get_config_from_sec
(
'train'
,
'momentum'
)
self
.
use_gpu
=
self
.
get_config_from_sec
(
'train'
,
'use_gpu'
)
self
.
num_gpus
=
self
.
get_config_from_sec
(
'train'
,
'num_gpus'
)
self
.
short_size
=
self
.
get_config_from_sec
(
self
.
mode
,
'short_size'
)
self
.
target_size
=
self
.
get_config_from_sec
(
self
.
mode
,
'target_size'
)
self
.
num_reader_threads
=
self
.
get_config_from_sec
(
self
.
mode
,
'num_reader_threads'
)
self
.
buf_size
=
self
.
get_config_from_sec
(
self
.
mode
,
'buf_size'
)
self
.
batch_size
=
self
.
get_config_from_sec
(
self
.
mode
,
'batch_size'
)
self
.
filelist
=
self
.
get_config_from_sec
(
self
.
mode
,
'filelist'
)
def
build_input
(
self
,
use_pyreader
=
True
):
image_shape
=
[
3
,
self
.
target_size
,
self
.
target_size
]
...
...
@@ -133,26 +125,3 @@ class TSN(ModelBase):
return
self
.
feature_input
if
self
.
mode
==
'infer'
else
self
.
feature_input
+
[
self
.
label_input
]
def
create_dataset_args
(
self
):
cfg
=
{}
cfg
[
'format'
]
=
self
.
format
cfg
[
'num_classes'
]
=
self
.
num_classes
cfg
[
'seg_num'
]
=
self
.
seg_num
cfg
[
'seglen'
]
=
self
.
seglen
cfg
[
'short_size'
]
=
self
.
short_size
cfg
[
'target_size'
]
=
self
.
target_size
cfg
[
'num_reader_threads'
]
=
self
.
num_reader_threads
cfg
[
'buf_size'
]
=
self
.
buf_size
cfg
[
'image_mean'
]
=
self
.
image_mean
cfg
[
'image_std'
]
=
self
.
image_std
cfg
[
'list'
]
=
self
.
filelist
if
self
.
use_gpu
and
(
self
.
py_reader
is
not
None
):
cfg
[
'batch_size'
]
=
int
(
self
.
batch_size
/
self
.
num_gpus
)
else
:
cfg
[
'batch_size'
]
=
self
.
batch_size
return
cfg
def
create_metrics_args
(
self
):
return
{}
fluid/PaddleCV/video/scripts/infer/infer_nextvlad.sh
浏览文件 @
26594a1f
python infer.py
--model-name
=
"NEXTVLAD"
--config
=
./configs/nextvlad.txt
--filelist
=
./data/youtube8m/infer.list
\
python
3
infer.py
--model-name
=
"NEXTVLAD"
--config
=
./configs/nextvlad.txt
--filelist
=
./data/youtube8m/infer.list
\
--weights
=
./checkpoints/NEXTVLAD_epoch0
\
--save-dir
=
"./save"
fluid/PaddleCV/video/scripts/infer/infer_stnet.sh
浏览文件 @
26594a1f
python infer.py
--model-name
=
"STNET"
--config
=
./configs/stnet.txt
--filelist
=
./data/kinetics/infer.list
\
python
3
infer.py
--model-name
=
"STNET"
--config
=
./configs/stnet.txt
--filelist
=
./data/kinetics/infer.list
\
--log-interval
=
10
--weights
=
./checkpoints/STNET_epoch0
--save-dir
=
./save
fluid/PaddleCV/video/scripts/infer/infer_tsn.sh
浏览文件 @
26594a1f
python infer.py
--model-name
=
"TSN"
--config
=
./configs/tsn.txt
--filelist
=
./data/kinetics/infer.list
\
python
3
infer.py
--model-name
=
"TSN"
--config
=
./configs/tsn.txt
--filelist
=
./data/kinetics/infer.list
\
--log-interval
=
10
--weights
=
./checkpoints/TSN_epoch0
--save-dir
=
./save
fluid/PaddleCV/video/scripts/test/test_nextvlad.sh
浏览文件 @
26594a1f
python test.py
--model-name
=
"NEXTVLAD"
--config
=
./configs/nextvlad.txt
\
python
3
test.py
--model-name
=
"NEXTVLAD"
--config
=
./configs/nextvlad.txt
\
--log-interval
=
10
--weights
=
./checkpoints/NEXTVLAD_epoch0
fluid/PaddleCV/video/scripts/test/test_stnet.sh
浏览文件 @
26594a1f
python test.py
--model-name
=
"STNET"
--config
=
./configs/stnet.txt
\
python
3
test.py
--model-name
=
"STNET"
--config
=
./configs/stnet.txt
\
--log-interval
=
10
--weights
=
./checkpoints/STNET_epoch0
fluid/PaddleCV/video/scripts/test/test_tsn.sh
浏览文件 @
26594a1f
python test.py
--model-name
=
"TSN"
--config
=
./configs/tsn.txt
\
python
3
test.py
--model-name
=
"TSN"
--config
=
./configs/tsn.txt
\
--log-interval
=
10
--weights
=
./checkpoints/TSN_epoch0
fluid/PaddleCV/video/scripts/train/train_nextvlad.sh
浏览文件 @
26594a1f
export
CUDA_VISIBLE_DEVICES
=
0,1,2,3
python train.py
--model-name
=
"NEXTVLAD"
--config
=
./configs/nextvlad.txt
--epoch-num
=
6
\
python3 train.py
--model-name
=
"NEXTVLAD"
--config
=
./configs/nextvlad.txt
--epoch-num
=
6
\
--valid-interval
=
1
--save-interval
=
1
--log-interval
=
10
fluid/PaddleCV/video/scripts/train/train_stnet.sh
浏览文件 @
26594a1f
python train.py
--model-name
=
"STNET"
--config
=
./configs/stnet.txt
--epoch-num
=
6
\
python
3
train.py
--model-name
=
"STNET"
--config
=
./configs/stnet.txt
--epoch-num
=
6
\
--valid-interval
=
1
--save-interval
=
1
--log-interval
=
10
fluid/PaddleCV/video/scripts/train/train_tsn.sh
浏览文件 @
26594a1f
python train.py
--model-name
=
"TSN"
--config
=
./configs/tsn.txt
--epoch-num
=
6
\
python
3
train.py
--model-name
=
"TSN"
--config
=
./configs/tsn.txt
--epoch-num
=
6
\
--valid-interval
=
1
--save-interval
=
1
--log-interval
=
10
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录