Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
曾经的那一瞬间
Models
提交
7e4e52cd
M
Models
项目概览
曾经的那一瞬间
/
Models
大约 1 年 前同步成功
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
Models
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
7e4e52cd
编写于
10月 21, 2020
作者:
Y
Yin Cui
提交者:
A. Unique TensorFlower
10月 21, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Internal change
PiperOrigin-RevId: 338348738
上级
f3641f23
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
38 addition
and
2 deletion
+38
-2
official/vision/beta/configs/video_classification.py
official/vision/beta/configs/video_classification.py
+38
-2
未找到文件。
official/vision/beta/configs/video_classification.py
浏览文件 @
7e4e52cd
...
...
@@ -50,6 +50,17 @@ class DataConfig(cfg.DataConfig):
min_image_size
:
int
=
256
def
kinetics400
(
is_training
):
"""Generated Kinectics 400 dataset configs."""
return
DataConfig
(
name
=
'kinetics400'
,
num_classes
=
400
,
is_training
=
is_training
,
split
=
'train'
if
is_training
else
'valid'
,
num_examples
=
215570
if
is_training
else
17706
,
feature_shape
=
(
64
,
224
,
224
,
3
)
if
is_training
else
(
250
,
224
,
224
,
3
))
def
kinetics600
(
is_training
):
"""Generated Kinectics 600 dataset configs."""
return
DataConfig
(
...
...
@@ -153,9 +164,35 @@ def video_classification() -> cfg.ExperimentConfig:
])
@
exp_factory
.
register_config_factory
(
'video_classification_kinetics400'
)
def
video_classification_kinetics400
()
->
cfg
.
ExperimentConfig
:
"""Video classification on Kinectics 400 with resnet."""
train_dataset
=
kinetics400
(
is_training
=
True
)
validation_dataset
=
kinetics400
(
is_training
=
False
)
task
=
VideoClassificationTask
(
model
=
VideoClassificationModel
(
backbone
=
backbones_3d
.
Backbone3D
(
type
=
'resnet_3d'
,
resnet_3d
=
backbones_3d
.
ResNet3D50
()),
norm_activation
=
common
.
NormActivation
(
norm_momentum
=
0.9
,
norm_epsilon
=
1e-5
)),
losses
=
Losses
(
l2_weight_decay
=
1e-4
),
train_data
=
train_dataset
,
validation_data
=
validation_dataset
)
config
=
cfg
.
ExperimentConfig
(
runtime
=
cfg
.
RuntimeConfig
(
mixed_precision_dtype
=
'bfloat16'
),
task
=
task
,
restrictions
=
[
'task.train_data.is_training != None'
,
'task.validation_data.is_training != None'
,
'task.train_data.num_classes == task.validation_data.num_classes'
,
])
add_trainer
(
config
,
train_batch_size
=
1024
,
eval_batch_size
=
64
)
return
config
@
exp_factory
.
register_config_factory
(
'video_classification_kinetics600'
)
def
video_classification_kinetics600
()
->
cfg
.
ExperimentConfig
:
"""Video classification on
Videonet
with resnet."""
"""Video classification on
Kinectics 600
with resnet."""
train_dataset
=
kinetics600
(
is_training
=
True
)
validation_dataset
=
kinetics600
(
is_training
=
False
)
task
=
VideoClassificationTask
(
...
...
@@ -176,5 +213,4 @@ def video_classification_kinetics600() -> cfg.ExperimentConfig:
'task.train_data.num_classes == task.validation_data.num_classes'
,
])
add_trainer
(
config
,
train_batch_size
=
1024
,
eval_batch_size
=
64
)
return
config
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录