Esse commit está contido em:
Taehoon Lee
2017-06-22 13:28:57 +09:00
commit de François Chollet
commit 60cf7ca6b2
7 arquivos alterados com 8 adições e 8 exclusões
+1 -1
Ver Arquivo
@@ -17,7 +17,7 @@ def load_data(path='imdb.npz', num_words=None, skip_top=0,
num_words: max number of words to include. Words are ranked
by how often they occur (in the training set) and only
the most frequent words are kept
skip_top: skip the top N most frequently occuring words
skip_top: skip the top N most frequently occurring words
(which may not be informative).
maxlen: truncate sequences after this length.
seed: random seed for sample shuffling.
+1 -1
Ver Arquivo
@@ -18,7 +18,7 @@ def load_data(path='reuters.npz', num_words=None, skip_top=0,
num_words: max number of words to include. Words are ranked
by how often they occur (in the training set) and only
the most frequent words are kept
skip_top: skip the top N most frequently occuring words
skip_top: skip the top N most frequently occurring words
(which may not be informative).
maxlen: truncate sequences after this length.
test_split: Fraction of the dataset to be used as test data.
+2 -2
Ver Arquivo
@@ -744,7 +744,7 @@ class Layer(object):
str(mask))
# masking not explicitly supported: return None as mask
return None
# if masking is explictly supported, by default
# if masking is explicitly supported, by default
# carry over the input mask
return mask
@@ -1529,7 +1529,7 @@ class Container(Layer):
# every time the Container is called on a set on input tensors,
# we compute the output tensors,
# output masks and output shapes in one pass,
# then cache them here. When of of these output is queried later,
# then cache them here. When one of these output is queried later,
# we retrieve it from there instead of recomputing it.
self._output_mask_cache = {}
self._output_tensor_cache = {}
+1 -1
Ver Arquivo
@@ -137,7 +137,7 @@ class BatchNormalization(Layer):
def normalize_inference():
if needs_broadcasting:
# In this case we must explictly broadcast all parameters.
# In this case we must explicitly broadcast all parameters.
broadcast_moving_mean = K.reshape(self.moving_mean,
broadcast_shape)
broadcast_moving_variance = K.reshape(self.moving_variance,
+1 -1
Ver Arquivo
@@ -207,7 +207,7 @@ def load_model(filepath, custom_objects=None, compile=True):
obj: object, dict, or list.
# Returns
The same structure, where occurences
The same structure, where occurrences
of a custom object name have been replaced
with the custom object.
"""
+1 -1
Ver Arquivo
@@ -127,7 +127,7 @@ def skipgrams(sequence, vocabulary_size,
of word indices (integers). If using a `sampling_table`,
word indices are expected to match the rank
of the words in a reference dataset (e.g. 10 would encode
the 10-th most frequently occuring token).
the 10-th most frequently occurring token).
Note that index 0 is expected to be a non-word and will be skipped.
vocabulary_size: int. maximum possible word index + 1
window_size: int. actually half-window.
+1 -1
Ver Arquivo
@@ -886,7 +886,7 @@ class TestBackend(object):
check_two_tensor_operation('binary_crossentropy', (4, 2), (4, 2), BACKENDS, from_logits=True)
# cross_entropy call require the label is a valid probability distribution,
# otherwise it is garbage in garbage out...
# due to the algo difference, we can't guranteen CNTK has the same result on the garbage input.
# due to the algo difference, we can't guarantee CNTK has the same result on the garbage input.
# so create a seperate test case for valid lable input
check_two_tensor_operation('categorical_crossentropy', (4, 2), (4, 2), [KTH, KTF], from_logits=True)
check_cross_entropy_with_valid_probability_distribution()