Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
weixin_40195168达庆意
keras
提交
5550cb0c
K
keras
项目概览
weixin_40195168达庆意
/
keras
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
keras
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
5550cb0c
编写于
9月 08, 2021
作者:
S
Scott Zhu
提交者:
TensorFlower Gardener
9月 08, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix remaining broken tests in v1.
PiperOrigin-RevId: 395526123
上级
519430bb
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
20 addition
and
1 deletion
+20
-1
keras/integration_test/preprocessing_applied_in_dataset_creator_test.py
...ion_test/preprocessing_applied_in_dataset_creator_test.py
+6
-0
keras/integration_test/preprocessing_applied_in_model_test.py
...s/integration_test/preprocessing_applied_in_model_test.py
+6
-0
keras/utils/layer_utils_test.py
keras/utils/layer_utils_test.py
+6
-1
keras/utils/tf_utils_test.py
keras/utils/tf_utils_test.py
+2
-0
未找到文件。
keras/integration_test/preprocessing_applied_in_dataset_creator_test.py
浏览文件 @
5550cb0c
...
...
@@ -46,6 +46,12 @@ class PreprocessingAppliedInDatasetCreatorTest(tf.test.TestCase):
"""Demonstrate Keras preprocessing layers applied in tf.data.Dataset.map."""
def
testDistributedModelFit
(
self
,
strategy
):
if
(
not
tf
.
__internal__
.
tf2
.
enabled
()
and
isinstance
(
strategy
,
tf
.
distribute
.
experimental
.
ParameterServerStrategy
)):
self
.
skipTest
(
"Parameter Server strategy with dataset creator need to be run when "
"eager execution is enabled."
)
with
strategy
.
scope
():
preprocessing_model
=
utils
.
make_preprocessing_model
(
self
.
get_temp_dir
())
training_model
=
utils
.
make_training_model
()
...
...
keras/integration_test/preprocessing_applied_in_model_test.py
浏览文件 @
5550cb0c
...
...
@@ -47,6 +47,12 @@ class PreprocessingAppliedInModelTest(tf.test.TestCase):
"""Demonstrate Keras preprocessing layers applied inside a Model."""
def
testDistributedModelFit
(
self
,
strategy
):
if
(
not
tf
.
__internal__
.
tf2
.
enabled
()
and
isinstance
(
strategy
,
tf
.
distribute
.
experimental
.
ParameterServerStrategy
)):
self
.
skipTest
(
"Parameter Server strategy with dataset creator need to be run when "
"eager execution is enabled."
)
with
strategy
.
scope
():
preprocessing_model
=
utils
.
make_preprocessing_model
(
self
.
get_temp_dir
())
training_model
=
utils
.
make_training_model
()
...
...
keras/utils/layer_utils_test.py
浏览文件 @
5550cb0c
...
...
@@ -183,7 +183,12 @@ class LayerUtilsTest(tf.test.TestCase):
reader
=
open
(
fpath
,
'r'
)
lines
=
reader
.
readlines
()
reader
.
close
()
self
.
assertEqual
(
len
(
lines
),
39
)
# The output content are slightly different for the input shapes between
# v1 and v2.
if
tf
.
__internal__
.
tf2
.
enabled
():
self
.
assertEqual
(
len
(
lines
),
39
)
else
:
self
.
assertEqual
(
len
(
lines
),
40
)
except
ImportError
:
pass
...
...
keras/utils/tf_utils_test.py
浏览文件 @
5550cb0c
...
...
@@ -232,6 +232,8 @@ class TestIsExtensionType(tf.test.TestCase):
class
TestRandomSeedSetting
(
tf
.
test
.
TestCase
):
def
test_seeds
(
self
):
if
not
tf
.
__internal__
.
tf2
.
enabled
():
self
.
skipTest
(
'set_random_seed() is only expected to work in tf2.'
)
def
get_model_output
():
model
=
keras
.
Sequential
([
keras
.
layers
.
Dense
(
10
),
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录