aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/contrib/keras
diff options
context:
space:
mode:
Diffstat (limited to 'tensorflow/contrib/keras')
-rw-r--r--tensorflow/contrib/keras/python/keras/backend.py2
-rw-r--r--tensorflow/contrib/keras/python/keras/utils/generic_utils.py6
2 files changed, 6 insertions, 2 deletions
diff --git a/tensorflow/contrib/keras/python/keras/backend.py b/tensorflow/contrib/keras/python/keras/backend.py
index 4fa4ec0dd4..6d7429d20d 100644
--- a/tensorflow/contrib/keras/python/keras/backend.py
+++ b/tensorflow/contrib/keras/python/keras/backend.py
@@ -3570,7 +3570,7 @@ def local_conv1d(inputs, kernel, kernel_size, strides, data_format=None):
Returns:
the tensor after 1d conv with un-shared weights, with shape (batch_size,
- output_lenght, filters)
+ output_length, filters)
Raises:
ValueError: if `data_format` is neither `channels_last` or
diff --git a/tensorflow/contrib/keras/python/keras/utils/generic_utils.py b/tensorflow/contrib/keras/python/keras/utils/generic_utils.py
index ed57144f9c..3428476b17 100644
--- a/tensorflow/contrib/keras/python/keras/utils/generic_utils.py
+++ b/tensorflow/contrib/keras/python/keras/utils/generic_utils.py
@@ -18,6 +18,7 @@ from __future__ import division
from __future__ import print_function
import marshal
+import os
import sys
import time
import types as python_types
@@ -195,7 +196,10 @@ def func_dump(func):
Returns:
A tuple `(code, defaults, closure)`.
"""
- code = marshal.dumps(func.__code__).decode('raw_unicode_escape')
+ if os.name == 'nt':
+ code = marshal.dumps(func.__code__).replace(b'\\',b'/').decode('raw_unicode_escape')
+ else:
+ code = marshal.dumps(func.__code__).decode('raw_unicode_escape')
defaults = func.__defaults__
if func.__closure__:
closure = tuple(c.cell_contents for c in func.__closure__)