keras 2.2.0__tar.gz → 2.2.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (273) hide show
  1. {Keras-2.2.0 → Keras-2.2.2/Keras.egg-info}/PKG-INFO +3 -3
  2. {Keras-2.2.0 → Keras-2.2.2}/Keras.egg-info/SOURCES.txt +53 -1
  3. {Keras-2.2.0 → Keras-2.2.2}/Keras.egg-info/requires.txt +2 -2
  4. {Keras-2.2.0/Keras.egg-info → Keras-2.2.2}/PKG-INFO +3 -3
  5. Keras-2.2.2/docs/__init__.pyc +0 -0
  6. {Keras-2.2.0 → Keras-2.2.2}/docs/autogen.py +50 -70
  7. Keras-2.2.2/docs/autogen.pyc +0 -0
  8. {Keras-2.2.0 → Keras-2.2.2}/docs/templates/applications.md +0 -18
  9. {Keras-2.2.0 → Keras-2.2.2}/docs/templates/getting-started/faq.md +2 -2
  10. {Keras-2.2.0 → Keras-2.2.2}/docs/templates/getting-started/sequential-model-guide.md +4 -0
  11. {Keras-2.2.0 → Keras-2.2.2}/docs/templates/models/about-keras-models.md +1 -2
  12. {Keras-2.2.0 → Keras-2.2.2}/docs/templates/regularizers.md +2 -2
  13. {Keras-2.2.0 → Keras-2.2.2}/examples/README.md +20 -2
  14. {Keras-2.2.0 → Keras-2.2.2}/examples/addition_rnn.py +1 -1
  15. {Keras-2.2.0 → Keras-2.2.2}/examples/babi_memnn.py +13 -6
  16. {Keras-2.2.0 → Keras-2.2.2}/examples/babi_rnn.py +9 -4
  17. {Keras-2.2.0 → Keras-2.2.2}/examples/cifar10_cnn.py +20 -3
  18. {Keras-2.2.0 → Keras-2.2.2}/examples/cifar10_cnn_capsule.py +16 -1
  19. {Keras-2.2.0 → Keras-2.2.2}/examples/cifar10_resnet.py +21 -1
  20. {Keras-2.2.0 → Keras-2.2.2}/examples/lstm_seq2seq.py +1 -1
  21. {Keras-2.2.0 → Keras-2.2.2}/examples/pretrained_word_embeddings.py +2 -1
  22. {Keras-2.2.0 → Keras-2.2.2}/keras/__init__.py +1 -1
  23. {Keras-2.2.0 → Keras-2.2.2}/keras/activations.py +11 -0
  24. {Keras-2.2.0 → Keras-2.2.2}/keras/applications/__init__.py +0 -1
  25. Keras-2.2.2/keras/applications/imagenet_utils.py +10 -0
  26. {Keras-2.2.0 → Keras-2.2.2}/keras/backend/__init__.py +3 -1
  27. {Keras-2.2.0 → Keras-2.2.2}/keras/backend/cntk_backend.py +38 -77
  28. {Keras-2.2.0 → Keras-2.2.2}/keras/backend/common.py +31 -0
  29. {Keras-2.2.0 → Keras-2.2.2}/keras/backend/tensorflow_backend.py +34 -68
  30. {Keras-2.2.0 → Keras-2.2.2}/keras/backend/theano_backend.py +19 -62
  31. {Keras-2.2.0 → Keras-2.2.2}/keras/callbacks.py +1 -1
  32. {Keras-2.2.0 → Keras-2.2.2}/keras/datasets/imdb.py +1 -1
  33. {Keras-2.2.0 → Keras-2.2.2}/keras/datasets/reuters.py +1 -1
  34. {Keras-2.2.0 → Keras-2.2.2}/keras/engine/base_layer.py +8 -27
  35. {Keras-2.2.0 → Keras-2.2.2}/keras/engine/input_layer.py +2 -4
  36. {Keras-2.2.0 → Keras-2.2.2}/keras/engine/network.py +51 -110
  37. {Keras-2.2.0 → Keras-2.2.2}/keras/engine/saving.py +2 -3
  38. {Keras-2.2.0 → Keras-2.2.2}/keras/engine/sequential.py +2 -2
  39. {Keras-2.2.0 → Keras-2.2.2}/keras/engine/training.py +10 -21
  40. {Keras-2.2.0 → Keras-2.2.2}/keras/engine/training_arrays.py +10 -18
  41. {Keras-2.2.0 → Keras-2.2.2}/keras/engine/training_generator.py +49 -35
  42. {Keras-2.2.0 → Keras-2.2.2}/keras/engine/training_utils.py +2 -2
  43. {Keras-2.2.0 → Keras-2.2.2}/keras/layers/convolutional.py +126 -47
  44. {Keras-2.2.0 → Keras-2.2.2}/keras/layers/convolutional_recurrent.py +1 -1
  45. {Keras-2.2.0 → Keras-2.2.2}/keras/layers/core.py +9 -20
  46. {Keras-2.2.0 → Keras-2.2.2}/keras/layers/embeddings.py +24 -24
  47. {Keras-2.2.0 → Keras-2.2.2}/keras/layers/local.py +2 -2
  48. {Keras-2.2.0 → Keras-2.2.2}/keras/layers/pooling.py +4 -5
  49. {Keras-2.2.0 → Keras-2.2.2}/keras/legacy/layers.py +4 -5
  50. {Keras-2.2.0 → Keras-2.2.2}/keras/losses.py +11 -0
  51. {Keras-2.2.0 → Keras-2.2.2}/keras/optimizers.py +29 -4
  52. {Keras-2.2.0 → Keras-2.2.2}/keras/utils/__init__.py +1 -0
  53. {Keras-2.2.0 → Keras-2.2.2}/keras/utils/conv_utils.py +36 -18
  54. {Keras-2.2.0 → Keras-2.2.2}/keras/utils/data_utils.py +1 -1
  55. {Keras-2.2.0 → Keras-2.2.2}/keras/utils/generic_utils.py +16 -0
  56. {Keras-2.2.0 → Keras-2.2.2}/keras/utils/io_utils.py +8 -2
  57. {Keras-2.2.0 → Keras-2.2.2}/keras/utils/layer_utils.py +43 -0
  58. {Keras-2.2.0 → Keras-2.2.2}/keras/utils/multi_gpu_utils.py +2 -2
  59. {Keras-2.2.0 → Keras-2.2.2}/keras/utils/test_utils.py +30 -44
  60. {Keras-2.2.0 → Keras-2.2.2}/keras/utils/vis_utils.py +0 -1
  61. {Keras-2.2.0 → Keras-2.2.2}/keras/wrappers/scikit_learn.py +2 -2
  62. {Keras-2.2.0 → Keras-2.2.2}/setup.py +5 -5
  63. Keras-2.2.2/tests/__pycache__/test_doc_auto_generation.cpython-27-PYTEST.pyc +0 -0
  64. Keras-2.2.2/tests/__pycache__/test_documentation.cpython-27-PYTEST.pyc +0 -0
  65. Keras-2.2.2/tests/__pycache__/test_dynamic_trainability.cpython-27-PYTEST.pyc +0 -0
  66. Keras-2.2.2/tests/__pycache__/test_loss_masking.cpython-27-PYTEST.pyc +0 -0
  67. Keras-2.2.2/tests/__pycache__/test_loss_weighting.cpython-27-PYTEST.pyc +0 -0
  68. Keras-2.2.2/tests/__pycache__/test_model_saving.cpython-27-PYTEST.pyc +0 -0
  69. Keras-2.2.2/tests/__pycache__/test_multiprocessing.cpython-27-PYTEST.pyc +0 -0
  70. Keras-2.2.2/tests/integration_tests/__pycache__/applications_test.cpython-27-PYTEST.pyc +0 -0
  71. Keras-2.2.2/tests/integration_tests/__pycache__/imagenet_utils_test.cpython-27-PYTEST.pyc +0 -0
  72. Keras-2.2.2/tests/integration_tests/__pycache__/test_datasets.cpython-27-PYTEST.pyc +0 -0
  73. Keras-2.2.2/tests/integration_tests/__pycache__/test_image_data_tasks.cpython-27-PYTEST.pyc +0 -0
  74. Keras-2.2.2/tests/integration_tests/__pycache__/test_temporal_data_tasks.cpython-27-PYTEST.pyc +0 -0
  75. Keras-2.2.2/tests/integration_tests/__pycache__/test_vector_data_tasks.cpython-27-PYTEST.pyc +0 -0
  76. {Keras-2.2.0 → Keras-2.2.2}/tests/integration_tests/imagenet_utils_test.py +0 -112
  77. Keras-2.2.2/tests/keras/__pycache__/activations_test.cpython-27-PYTEST.pyc +0 -0
  78. Keras-2.2.2/tests/keras/__pycache__/constraints_test.cpython-27-PYTEST.pyc +0 -0
  79. Keras-2.2.2/tests/keras/__pycache__/initializers_test.cpython-27-PYTEST.pyc +0 -0
  80. Keras-2.2.2/tests/keras/__pycache__/losses_test.cpython-27-PYTEST.pyc +0 -0
  81. Keras-2.2.2/tests/keras/__pycache__/metrics_test.cpython-27-PYTEST.pyc +0 -0
  82. Keras-2.2.2/tests/keras/__pycache__/optimizers_test.cpython-27-PYTEST.pyc +0 -0
  83. Keras-2.2.2/tests/keras/__pycache__/regularizers_test.cpython-27-PYTEST.pyc +0 -0
  84. Keras-2.2.2/tests/keras/__pycache__/test_callbacks.cpython-27-PYTEST.pyc +0 -0
  85. {Keras-2.2.0 → Keras-2.2.2}/tests/keras/__pycache__/test_sequential_model.cpython-27-PYTEST.pyc +0 -0
  86. Keras-2.2.2/tests/keras/backend/__pycache__/backend_test.cpython-27-PYTEST.pyc +0 -0
  87. {Keras-2.2.0 → Keras-2.2.2}/tests/keras/backend/backend_test.py +37 -13
  88. Keras-2.2.2/tests/keras/backend/reference_operations.pyc +0 -0
  89. Keras-2.2.2/tests/keras/engine/__pycache__/test_topology.cpython-27-PYTEST.pyc +0 -0
  90. Keras-2.2.2/tests/keras/engine/__pycache__/test_training.cpython-27-PYTEST.pyc +0 -0
  91. {Keras-2.2.0 → Keras-2.2.2}/tests/keras/engine/test_topology.py +15 -0
  92. {Keras-2.2.0 → Keras-2.2.2}/tests/keras/engine/test_training.py +19 -1
  93. Keras-2.2.2/tests/keras/layers/__pycache__/advanced_activations_test.cpython-27-PYTEST.pyc +0 -0
  94. Keras-2.2.2/tests/keras/layers/__pycache__/convolutional_recurrent_test.cpython-27-PYTEST.pyc +0 -0
  95. Keras-2.2.2/tests/keras/layers/__pycache__/convolutional_test.cpython-27-PYTEST.pyc +0 -0
  96. Keras-2.2.2/tests/keras/layers/__pycache__/core_test.cpython-27-PYTEST.pyc +0 -0
  97. Keras-2.2.2/tests/keras/layers/__pycache__/cudnn_recurrent_test.cpython-27-PYTEST.pyc +0 -0
  98. Keras-2.2.2/tests/keras/layers/__pycache__/embeddings_test.cpython-27-PYTEST.pyc +0 -0
  99. Keras-2.2.2/tests/keras/layers/__pycache__/local_test.cpython-27-PYTEST.pyc +0 -0
  100. Keras-2.2.2/tests/keras/layers/__pycache__/merge_test.cpython-27-PYTEST.pyc +0 -0
  101. Keras-2.2.2/tests/keras/layers/__pycache__/noise_test.cpython-27-PYTEST.pyc +0 -0
  102. Keras-2.2.2/tests/keras/layers/__pycache__/normalization_test.cpython-27-PYTEST.pyc +0 -0
  103. Keras-2.2.2/tests/keras/layers/__pycache__/recurrent_test.cpython-27-PYTEST.pyc +0 -0
  104. Keras-2.2.2/tests/keras/layers/__pycache__/wrappers_test.cpython-27-PYTEST.pyc +0 -0
  105. {Keras-2.2.0 → Keras-2.2.2}/tests/keras/layers/convolutional_test.py +88 -32
  106. {Keras-2.2.0 → Keras-2.2.2}/tests/keras/layers/core_test.py +10 -0
  107. Keras-2.2.2/tests/keras/legacy/__pycache__/interface_test.cpython-27-PYTEST.pyc +0 -0
  108. Keras-2.2.2/tests/keras/legacy/__pycache__/layers_test.cpython-27-PYTEST.pyc +0 -0
  109. {Keras-2.2.0 → Keras-2.2.2}/tests/keras/optimizers_test.py +7 -4
  110. Keras-2.2.2/tests/keras/preprocessing/__pycache__/image_test.cpython-27-PYTEST.pyc +0 -0
  111. Keras-2.2.2/tests/keras/preprocessing/__pycache__/sequence_test.cpython-27-PYTEST.pyc +0 -0
  112. Keras-2.2.2/tests/keras/preprocessing/__pycache__/text_test.cpython-27-PYTEST.pyc +0 -0
  113. {Keras-2.2.0 → Keras-2.2.2}/tests/keras/test_callbacks.py +15 -2
  114. {Keras-2.2.0 → Keras-2.2.2}/tests/keras/test_sequential_model.py +65 -0
  115. Keras-2.2.2/tests/keras/utils/__pycache__/conv_utils_test.cpython-27-PYTEST.pyc +0 -0
  116. Keras-2.2.2/tests/keras/utils/__pycache__/data_utils_test.cpython-27-PYTEST.pyc +0 -0
  117. Keras-2.2.2/tests/keras/utils/__pycache__/generic_utils_test.cpython-27-PYTEST.pyc +0 -0
  118. Keras-2.2.2/tests/keras/utils/__pycache__/io_utils_test.cpython-27-PYTEST.pyc +0 -0
  119. Keras-2.2.2/tests/keras/utils/__pycache__/layer_utils_test.cpython-27-PYTEST.pyc +0 -0
  120. Keras-2.2.2/tests/keras/utils/__pycache__/multi_gpu_test.cpython-27-PYTEST.pyc +0 -0
  121. Keras-2.2.2/tests/keras/utils/__pycache__/np_utils_test.cpython-27-PYTEST.pyc +0 -0
  122. Keras-2.2.2/tests/keras/utils/__pycache__/vis_utils_test.cpython-27-PYTEST.pyc +0 -0
  123. {Keras-2.2.0 → Keras-2.2.2}/tests/keras/utils/conv_utils_test.py +18 -8
  124. {Keras-2.2.0 → Keras-2.2.2}/tests/keras/utils/io_utils_test.py +10 -0
  125. Keras-2.2.2/tests/keras/wrappers/__pycache__/scikit_learn_test.cpython-27-PYTEST.pyc +0 -0
  126. {Keras-2.2.0 → Keras-2.2.2}/tests/test_documentation.py +5 -2
  127. {Keras-2.2.0 → Keras-2.2.2}/tests/test_model_saving.py +45 -1
  128. Keras-2.2.0/keras/applications/imagenet_utils.py +0 -322
  129. Keras-2.2.0/tests/__pycache__/test_model_saving.cpython-27-PYTEST.pyc +0 -0
  130. {Keras-2.2.0 → Keras-2.2.2}/CONTRIBUTING.md +0 -0
  131. {Keras-2.2.0 → Keras-2.2.2}/Keras.egg-info/dependency_links.txt +0 -0
  132. {Keras-2.2.0 → Keras-2.2.2}/Keras.egg-info/top_level.txt +0 -0
  133. {Keras-2.2.0 → Keras-2.2.2}/LICENSE +0 -0
  134. {Keras-2.2.0 → Keras-2.2.2}/MANIFEST.in +0 -0
  135. {Keras-2.2.0 → Keras-2.2.2}/README.md +0 -0
  136. {Keras-2.2.0 → Keras-2.2.2}/docs/README.md +0 -0
  137. {Keras-2.2.0 → Keras-2.2.2}/docs/__init__.py +0 -0
  138. {Keras-2.2.0 → Keras-2.2.2}/docs/mkdocs.yml +0 -0
  139. {Keras-2.2.0 → Keras-2.2.2}/docs/templates/activations.md +0 -0
  140. {Keras-2.2.0 → Keras-2.2.2}/docs/templates/backend.md +0 -0
  141. {Keras-2.2.0 → Keras-2.2.2}/docs/templates/callbacks.md +0 -0
  142. {Keras-2.2.0 → Keras-2.2.2}/docs/templates/constraints.md +0 -0
  143. {Keras-2.2.0 → Keras-2.2.2}/docs/templates/datasets.md +0 -0
  144. {Keras-2.2.0 → Keras-2.2.2}/docs/templates/getting-started/functional-api-guide.md +0 -0
  145. {Keras-2.2.0 → Keras-2.2.2}/docs/templates/index.md +0 -0
  146. {Keras-2.2.0 → Keras-2.2.2}/docs/templates/initializers.md +0 -0
  147. {Keras-2.2.0 → Keras-2.2.2}/docs/templates/layers/about-keras-layers.md +0 -0
  148. {Keras-2.2.0 → Keras-2.2.2}/docs/templates/layers/writing-your-own-keras-layers.md +0 -0
  149. {Keras-2.2.0 → Keras-2.2.2}/docs/templates/losses.md +0 -0
  150. {Keras-2.2.0 → Keras-2.2.2}/docs/templates/metrics.md +0 -0
  151. {Keras-2.2.0 → Keras-2.2.2}/docs/templates/models/model.md +0 -0
  152. {Keras-2.2.0 → Keras-2.2.2}/docs/templates/models/sequential.md +0 -0
  153. {Keras-2.2.0 → Keras-2.2.2}/docs/templates/optimizers.md +0 -0
  154. {Keras-2.2.0 → Keras-2.2.2}/docs/templates/preprocessing/image.md +0 -0
  155. {Keras-2.2.0 → Keras-2.2.2}/docs/templates/preprocessing/text.md +0 -0
  156. {Keras-2.2.0 → Keras-2.2.2}/docs/templates/scikit-learn-api.md +0 -0
  157. {Keras-2.2.0 → Keras-2.2.2}/docs/templates/visualization.md +0 -0
  158. {Keras-2.2.0 → Keras-2.2.2}/docs/templates/why-use-keras.md +0 -0
  159. {Keras-2.2.0 → Keras-2.2.2}/examples/antirectifier.py +0 -0
  160. {Keras-2.2.0 → Keras-2.2.2}/examples/cifar10_cnn_tfaugment2d.py +0 -0
  161. {Keras-2.2.0 → Keras-2.2.2}/examples/conv_filter_visualization.py +0 -0
  162. {Keras-2.2.0 → Keras-2.2.2}/examples/conv_lstm.py +0 -0
  163. {Keras-2.2.0 → Keras-2.2.2}/examples/deep_dream.py +0 -0
  164. {Keras-2.2.0 → Keras-2.2.2}/examples/image_ocr.py +0 -0
  165. {Keras-2.2.0 → Keras-2.2.2}/examples/imdb_bidirectional_lstm.py +0 -0
  166. {Keras-2.2.0 → Keras-2.2.2}/examples/imdb_cnn.py +0 -0
  167. {Keras-2.2.0 → Keras-2.2.2}/examples/imdb_cnn_lstm.py +0 -0
  168. {Keras-2.2.0 → Keras-2.2.2}/examples/imdb_fasttext.py +0 -0
  169. {Keras-2.2.0 → Keras-2.2.2}/examples/imdb_lstm.py +0 -0
  170. {Keras-2.2.0 → Keras-2.2.2}/examples/lstm_seq2seq_restore.py +0 -0
  171. {Keras-2.2.0 → Keras-2.2.2}/examples/lstm_stateful.py +0 -0
  172. {Keras-2.2.0 → Keras-2.2.2}/examples/lstm_text_generation.py +0 -0
  173. {Keras-2.2.0 → Keras-2.2.2}/examples/mnist_acgan.py +0 -0
  174. {Keras-2.2.0 → Keras-2.2.2}/examples/mnist_cnn.py +0 -0
  175. {Keras-2.2.0 → Keras-2.2.2}/examples/mnist_dataset_api.py +0 -0
  176. {Keras-2.2.0 → Keras-2.2.2}/examples/mnist_denoising_autoencoder.py +0 -0
  177. {Keras-2.2.0 → Keras-2.2.2}/examples/mnist_hierarchical_rnn.py +0 -0
  178. {Keras-2.2.0 → Keras-2.2.2}/examples/mnist_irnn.py +0 -0
  179. {Keras-2.2.0 → Keras-2.2.2}/examples/mnist_mlp.py +0 -0
  180. {Keras-2.2.0 → Keras-2.2.2}/examples/mnist_net2net.py +0 -0
  181. {Keras-2.2.0 → Keras-2.2.2}/examples/mnist_siamese.py +0 -0
  182. {Keras-2.2.0 → Keras-2.2.2}/examples/mnist_sklearn_wrapper.py +0 -0
  183. {Keras-2.2.0 → Keras-2.2.2}/examples/mnist_swwae.py +0 -0
  184. {Keras-2.2.0 → Keras-2.2.2}/examples/mnist_tfrecord.py +0 -0
  185. {Keras-2.2.0 → Keras-2.2.2}/examples/mnist_transfer_cnn.py +0 -0
  186. {Keras-2.2.0 → Keras-2.2.2}/examples/neural_doodle.py +0 -0
  187. {Keras-2.2.0 → Keras-2.2.2}/examples/neural_style_transfer.py +0 -0
  188. {Keras-2.2.0 → Keras-2.2.2}/examples/reuters_mlp.py +0 -0
  189. {Keras-2.2.0 → Keras-2.2.2}/examples/reuters_mlp_relu_vs_selu.py +0 -0
  190. {Keras-2.2.0 → Keras-2.2.2}/examples/tensorboard_embeddings_mnist.py +0 -0
  191. {Keras-2.2.0 → Keras-2.2.2}/examples/variational_autoencoder.py +0 -0
  192. {Keras-2.2.0 → Keras-2.2.2}/examples/variational_autoencoder_deconv.py +0 -0
  193. {Keras-2.2.0 → Keras-2.2.2}/keras/applications/densenet.py +0 -0
  194. {Keras-2.2.0 → Keras-2.2.2}/keras/applications/inception_resnet_v2.py +0 -0
  195. {Keras-2.2.0 → Keras-2.2.2}/keras/applications/inception_v3.py +0 -0
  196. {Keras-2.2.0 → Keras-2.2.2}/keras/applications/mobilenet.py +0 -0
  197. {Keras-2.2.0 → Keras-2.2.2}/keras/applications/mobilenetv2.py +0 -0
  198. {Keras-2.2.0 → Keras-2.2.2}/keras/applications/nasnet.py +0 -0
  199. {Keras-2.2.0 → Keras-2.2.2}/keras/applications/resnet50.py +0 -0
  200. {Keras-2.2.0 → Keras-2.2.2}/keras/applications/vgg16.py +0 -0
  201. {Keras-2.2.0 → Keras-2.2.2}/keras/applications/vgg19.py +0 -0
  202. {Keras-2.2.0 → Keras-2.2.2}/keras/applications/xception.py +0 -0
  203. {Keras-2.2.0 → Keras-2.2.2}/keras/constraints.py +0 -0
  204. {Keras-2.2.0 → Keras-2.2.2}/keras/datasets/__init__.py +0 -0
  205. {Keras-2.2.0 → Keras-2.2.2}/keras/datasets/boston_housing.py +0 -0
  206. {Keras-2.2.0 → Keras-2.2.2}/keras/datasets/cifar.py +0 -0
  207. {Keras-2.2.0 → Keras-2.2.2}/keras/datasets/cifar10.py +0 -0
  208. {Keras-2.2.0 → Keras-2.2.2}/keras/datasets/cifar100.py +0 -0
  209. {Keras-2.2.0 → Keras-2.2.2}/keras/datasets/fashion_mnist.py +0 -0
  210. {Keras-2.2.0 → Keras-2.2.2}/keras/datasets/mnist.py +0 -0
  211. {Keras-2.2.0 → Keras-2.2.2}/keras/engine/__init__.py +0 -0
  212. {Keras-2.2.0 → Keras-2.2.2}/keras/engine/topology.py +0 -0
  213. {Keras-2.2.0 → Keras-2.2.2}/keras/initializers.py +0 -0
  214. {Keras-2.2.0 → Keras-2.2.2}/keras/layers/__init__.py +0 -0
  215. {Keras-2.2.0 → Keras-2.2.2}/keras/layers/advanced_activations.py +0 -0
  216. {Keras-2.2.0 → Keras-2.2.2}/keras/layers/cudnn_recurrent.py +0 -0
  217. {Keras-2.2.0 → Keras-2.2.2}/keras/layers/merge.py +0 -0
  218. {Keras-2.2.0 → Keras-2.2.2}/keras/layers/noise.py +0 -0
  219. {Keras-2.2.0 → Keras-2.2.2}/keras/layers/normalization.py +0 -0
  220. {Keras-2.2.0 → Keras-2.2.2}/keras/layers/recurrent.py +0 -0
  221. {Keras-2.2.0 → Keras-2.2.2}/keras/layers/wrappers.py +0 -0
  222. {Keras-2.2.0 → Keras-2.2.2}/keras/legacy/__init__.py +0 -0
  223. {Keras-2.2.0 → Keras-2.2.2}/keras/legacy/interfaces.py +0 -0
  224. {Keras-2.2.0 → Keras-2.2.2}/keras/metrics.py +0 -0
  225. {Keras-2.2.0 → Keras-2.2.2}/keras/models.py +0 -0
  226. {Keras-2.2.0 → Keras-2.2.2}/keras/objectives.py +0 -0
  227. {Keras-2.2.0 → Keras-2.2.2}/keras/preprocessing/__init__.py +0 -0
  228. {Keras-2.2.0 → Keras-2.2.2}/keras/preprocessing/image.py +0 -0
  229. {Keras-2.2.0 → Keras-2.2.2}/keras/preprocessing/sequence.py +0 -0
  230. {Keras-2.2.0 → Keras-2.2.2}/keras/preprocessing/text.py +0 -0
  231. {Keras-2.2.0 → Keras-2.2.2}/keras/regularizers.py +0 -0
  232. {Keras-2.2.0 → Keras-2.2.2}/keras/utils/np_utils.py +0 -0
  233. {Keras-2.2.0 → Keras-2.2.2}/keras/wrappers/__init__.py +0 -0
  234. {Keras-2.2.0 → Keras-2.2.2}/setup.cfg +0 -0
  235. {Keras-2.2.0 → Keras-2.2.2}/tests/integration_tests/applications_test.py +0 -0
  236. {Keras-2.2.0 → Keras-2.2.2}/tests/integration_tests/test_datasets.py +0 -0
  237. {Keras-2.2.0 → Keras-2.2.2}/tests/integration_tests/test_image_data_tasks.py +0 -0
  238. {Keras-2.2.0 → Keras-2.2.2}/tests/integration_tests/test_temporal_data_tasks.py +0 -0
  239. {Keras-2.2.0 → Keras-2.2.2}/tests/integration_tests/test_vector_data_tasks.py +0 -0
  240. {Keras-2.2.0 → Keras-2.2.2}/tests/keras/activations_test.py +0 -0
  241. {Keras-2.2.0 → Keras-2.2.2}/tests/keras/backend/reference_operations.py +0 -0
  242. {Keras-2.2.0 → Keras-2.2.2}/tests/keras/constraints_test.py +0 -0
  243. {Keras-2.2.0 → Keras-2.2.2}/tests/keras/initializers_test.py +0 -0
  244. {Keras-2.2.0 → Keras-2.2.2}/tests/keras/layers/advanced_activations_test.py +0 -0
  245. {Keras-2.2.0 → Keras-2.2.2}/tests/keras/layers/convolutional_recurrent_test.py +0 -0
  246. {Keras-2.2.0 → Keras-2.2.2}/tests/keras/layers/cudnn_recurrent_test.py +0 -0
  247. {Keras-2.2.0 → Keras-2.2.2}/tests/keras/layers/embeddings_test.py +0 -0
  248. {Keras-2.2.0 → Keras-2.2.2}/tests/keras/layers/local_test.py +0 -0
  249. {Keras-2.2.0 → Keras-2.2.2}/tests/keras/layers/merge_test.py +0 -0
  250. {Keras-2.2.0 → Keras-2.2.2}/tests/keras/layers/noise_test.py +0 -0
  251. {Keras-2.2.0 → Keras-2.2.2}/tests/keras/layers/normalization_test.py +0 -0
  252. {Keras-2.2.0 → Keras-2.2.2}/tests/keras/layers/recurrent_test.py +0 -0
  253. {Keras-2.2.0 → Keras-2.2.2}/tests/keras/layers/wrappers_test.py +0 -0
  254. {Keras-2.2.0 → Keras-2.2.2}/tests/keras/legacy/interface_test.py +0 -0
  255. {Keras-2.2.0 → Keras-2.2.2}/tests/keras/legacy/layers_test.py +0 -0
  256. {Keras-2.2.0 → Keras-2.2.2}/tests/keras/losses_test.py +0 -0
  257. {Keras-2.2.0 → Keras-2.2.2}/tests/keras/metrics_test.py +0 -0
  258. {Keras-2.2.0 → Keras-2.2.2}/tests/keras/preprocessing/image_test.py +0 -0
  259. {Keras-2.2.0 → Keras-2.2.2}/tests/keras/preprocessing/sequence_test.py +0 -0
  260. {Keras-2.2.0 → Keras-2.2.2}/tests/keras/preprocessing/text_test.py +0 -0
  261. {Keras-2.2.0 → Keras-2.2.2}/tests/keras/regularizers_test.py +0 -0
  262. {Keras-2.2.0 → Keras-2.2.2}/tests/keras/utils/data_utils_test.py +0 -0
  263. {Keras-2.2.0 → Keras-2.2.2}/tests/keras/utils/generic_utils_test.py +0 -0
  264. {Keras-2.2.0 → Keras-2.2.2}/tests/keras/utils/layer_utils_test.py +0 -0
  265. {Keras-2.2.0 → Keras-2.2.2}/tests/keras/utils/multi_gpu_test.py +0 -0
  266. {Keras-2.2.0 → Keras-2.2.2}/tests/keras/utils/np_utils_test.py +0 -0
  267. {Keras-2.2.0 → Keras-2.2.2}/tests/keras/utils/vis_utils_test.py +0 -0
  268. {Keras-2.2.0 → Keras-2.2.2}/tests/keras/wrappers/scikit_learn_test.py +0 -0
  269. {Keras-2.2.0 → Keras-2.2.2}/tests/test_doc_auto_generation.py +0 -0
  270. {Keras-2.2.0 → Keras-2.2.2}/tests/test_dynamic_trainability.py +0 -0
  271. {Keras-2.2.0 → Keras-2.2.2}/tests/test_loss_masking.py +0 -0
  272. {Keras-2.2.0 → Keras-2.2.2}/tests/test_loss_weighting.py +0 -0
  273. {Keras-2.2.0 → Keras-2.2.2}/tests/test_multiprocessing.py +0 -0
@@ -1,12 +1,12 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: Keras
3
- Version: 2.2.0
3
+ Version: 2.2.2
4
4
  Summary: Deep Learning for humans
5
5
  Home-page: https://github.com/keras-team/keras
6
6
  Author: Francois Chollet
7
7
  Author-email: francois.chollet@gmail.com
8
8
  License: MIT
9
- Download-URL: https://github.com/keras-team/keras/tarball/2.2.0
9
+ Download-URL: https://github.com/keras-team/keras/tarball/2.2.2
10
10
  Description:
11
11
  Keras is a high-level neural networks API,
12
12
  written in Python and capable of running on top of
@@ -26,7 +26,7 @@ Description:
26
26
  https://keras.io/why-use-keras/
27
27
 
28
28
  Keras is compatible with Python 2.7-3.6
29
- and is distributed under the MIT liense.
29
+ and is distributed under the MIT license.
30
30
 
31
31
  Platform: UNKNOWN
32
32
  Classifier: Development Status :: 5 - Production/Stable
@@ -11,7 +11,9 @@ Keras.egg-info/requires.txt
11
11
  Keras.egg-info/top_level.txt
12
12
  docs/README.md
13
13
  docs/__init__.py
14
+ docs/__init__.pyc
14
15
  docs/autogen.py
16
+ docs/autogen.pyc
15
17
  docs/mkdocs.yml
16
18
  docs/templates/activations.md
17
19
  docs/templates/applications.md
@@ -169,13 +171,25 @@ tests/test_loss_masking.py
169
171
  tests/test_loss_weighting.py
170
172
  tests/test_model_saving.py
171
173
  tests/test_multiprocessing.py
174
+ tests/__pycache__/test_doc_auto_generation.cpython-27-PYTEST.pyc
175
+ tests/__pycache__/test_documentation.cpython-27-PYTEST.pyc
176
+ tests/__pycache__/test_dynamic_trainability.cpython-27-PYTEST.pyc
177
+ tests/__pycache__/test_loss_masking.cpython-27-PYTEST.pyc
178
+ tests/__pycache__/test_loss_weighting.cpython-27-PYTEST.pyc
172
179
  tests/__pycache__/test_model_saving.cpython-27-PYTEST.pyc
180
+ tests/__pycache__/test_multiprocessing.cpython-27-PYTEST.pyc
173
181
  tests/integration_tests/applications_test.py
174
182
  tests/integration_tests/imagenet_utils_test.py
175
183
  tests/integration_tests/test_datasets.py
176
184
  tests/integration_tests/test_image_data_tasks.py
177
185
  tests/integration_tests/test_temporal_data_tasks.py
178
186
  tests/integration_tests/test_vector_data_tasks.py
187
+ tests/integration_tests/__pycache__/applications_test.cpython-27-PYTEST.pyc
188
+ tests/integration_tests/__pycache__/imagenet_utils_test.cpython-27-PYTEST.pyc
189
+ tests/integration_tests/__pycache__/test_datasets.cpython-27-PYTEST.pyc
190
+ tests/integration_tests/__pycache__/test_image_data_tasks.cpython-27-PYTEST.pyc
191
+ tests/integration_tests/__pycache__/test_temporal_data_tasks.cpython-27-PYTEST.pyc
192
+ tests/integration_tests/__pycache__/test_vector_data_tasks.cpython-27-PYTEST.pyc
179
193
  tests/keras/activations_test.py
180
194
  tests/keras/constraints_test.py
181
195
  tests/keras/initializers_test.py
@@ -185,11 +199,23 @@ tests/keras/optimizers_test.py
185
199
  tests/keras/regularizers_test.py
186
200
  tests/keras/test_callbacks.py
187
201
  tests/keras/test_sequential_model.py
202
+ tests/keras/__pycache__/activations_test.cpython-27-PYTEST.pyc
203
+ tests/keras/__pycache__/constraints_test.cpython-27-PYTEST.pyc
204
+ tests/keras/__pycache__/initializers_test.cpython-27-PYTEST.pyc
205
+ tests/keras/__pycache__/losses_test.cpython-27-PYTEST.pyc
206
+ tests/keras/__pycache__/metrics_test.cpython-27-PYTEST.pyc
207
+ tests/keras/__pycache__/optimizers_test.cpython-27-PYTEST.pyc
208
+ tests/keras/__pycache__/regularizers_test.cpython-27-PYTEST.pyc
209
+ tests/keras/__pycache__/test_callbacks.cpython-27-PYTEST.pyc
188
210
  tests/keras/__pycache__/test_sequential_model.cpython-27-PYTEST.pyc
189
211
  tests/keras/backend/backend_test.py
190
212
  tests/keras/backend/reference_operations.py
213
+ tests/keras/backend/reference_operations.pyc
214
+ tests/keras/backend/__pycache__/backend_test.cpython-27-PYTEST.pyc
191
215
  tests/keras/engine/test_topology.py
192
216
  tests/keras/engine/test_training.py
217
+ tests/keras/engine/__pycache__/test_topology.cpython-27-PYTEST.pyc
218
+ tests/keras/engine/__pycache__/test_training.cpython-27-PYTEST.pyc
193
219
  tests/keras/layers/advanced_activations_test.py
194
220
  tests/keras/layers/convolutional_recurrent_test.py
195
221
  tests/keras/layers/convolutional_test.py
@@ -202,11 +228,28 @@ tests/keras/layers/noise_test.py
202
228
  tests/keras/layers/normalization_test.py
203
229
  tests/keras/layers/recurrent_test.py
204
230
  tests/keras/layers/wrappers_test.py
231
+ tests/keras/layers/__pycache__/advanced_activations_test.cpython-27-PYTEST.pyc
232
+ tests/keras/layers/__pycache__/convolutional_recurrent_test.cpython-27-PYTEST.pyc
233
+ tests/keras/layers/__pycache__/convolutional_test.cpython-27-PYTEST.pyc
234
+ tests/keras/layers/__pycache__/core_test.cpython-27-PYTEST.pyc
235
+ tests/keras/layers/__pycache__/cudnn_recurrent_test.cpython-27-PYTEST.pyc
236
+ tests/keras/layers/__pycache__/embeddings_test.cpython-27-PYTEST.pyc
237
+ tests/keras/layers/__pycache__/local_test.cpython-27-PYTEST.pyc
238
+ tests/keras/layers/__pycache__/merge_test.cpython-27-PYTEST.pyc
239
+ tests/keras/layers/__pycache__/noise_test.cpython-27-PYTEST.pyc
240
+ tests/keras/layers/__pycache__/normalization_test.cpython-27-PYTEST.pyc
241
+ tests/keras/layers/__pycache__/recurrent_test.cpython-27-PYTEST.pyc
242
+ tests/keras/layers/__pycache__/wrappers_test.cpython-27-PYTEST.pyc
205
243
  tests/keras/legacy/interface_test.py
206
244
  tests/keras/legacy/layers_test.py
245
+ tests/keras/legacy/__pycache__/interface_test.cpython-27-PYTEST.pyc
246
+ tests/keras/legacy/__pycache__/layers_test.cpython-27-PYTEST.pyc
207
247
  tests/keras/preprocessing/image_test.py
208
248
  tests/keras/preprocessing/sequence_test.py
209
249
  tests/keras/preprocessing/text_test.py
250
+ tests/keras/preprocessing/__pycache__/image_test.cpython-27-PYTEST.pyc
251
+ tests/keras/preprocessing/__pycache__/sequence_test.cpython-27-PYTEST.pyc
252
+ tests/keras/preprocessing/__pycache__/text_test.cpython-27-PYTEST.pyc
210
253
  tests/keras/utils/conv_utils_test.py
211
254
  tests/keras/utils/data_utils_test.py
212
255
  tests/keras/utils/generic_utils_test.py
@@ -215,4 +258,13 @@ tests/keras/utils/layer_utils_test.py
215
258
  tests/keras/utils/multi_gpu_test.py
216
259
  tests/keras/utils/np_utils_test.py
217
260
  tests/keras/utils/vis_utils_test.py
218
- tests/keras/wrappers/scikit_learn_test.py
261
+ tests/keras/utils/__pycache__/conv_utils_test.cpython-27-PYTEST.pyc
262
+ tests/keras/utils/__pycache__/data_utils_test.cpython-27-PYTEST.pyc
263
+ tests/keras/utils/__pycache__/generic_utils_test.cpython-27-PYTEST.pyc
264
+ tests/keras/utils/__pycache__/io_utils_test.cpython-27-PYTEST.pyc
265
+ tests/keras/utils/__pycache__/layer_utils_test.cpython-27-PYTEST.pyc
266
+ tests/keras/utils/__pycache__/multi_gpu_test.cpython-27-PYTEST.pyc
267
+ tests/keras/utils/__pycache__/np_utils_test.cpython-27-PYTEST.pyc
268
+ tests/keras/utils/__pycache__/vis_utils_test.cpython-27-PYTEST.pyc
269
+ tests/keras/wrappers/scikit_learn_test.py
270
+ tests/keras/wrappers/__pycache__/scikit_learn_test.cpython-27-PYTEST.pyc
@@ -3,8 +3,8 @@ scipy>=0.14
3
3
  six>=1.9.0
4
4
  pyyaml
5
5
  h5py
6
- keras_applications==1.0.2
7
- keras_preprocessing==1.0.1
6
+ keras_applications==1.0.4
7
+ keras_preprocessing==1.0.2
8
8
 
9
9
  [tests]
10
10
  pytest
@@ -1,12 +1,12 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: Keras
3
- Version: 2.2.0
3
+ Version: 2.2.2
4
4
  Summary: Deep Learning for humans
5
5
  Home-page: https://github.com/keras-team/keras
6
6
  Author: Francois Chollet
7
7
  Author-email: francois.chollet@gmail.com
8
8
  License: MIT
9
- Download-URL: https://github.com/keras-team/keras/tarball/2.2.0
9
+ Download-URL: https://github.com/keras-team/keras/tarball/2.2.2
10
10
  Description:
11
11
  Keras is a high-level neural networks API,
12
12
  written in Python and capable of running on top of
@@ -26,7 +26,7 @@ Description:
26
26
  https://keras.io/why-use-keras/
27
27
 
28
28
  Keras is compatible with Python 2.7-3.6
29
- and is distributed under the MIT liense.
29
+ and is distributed under the MIT license.
30
30
 
31
31
  Platform: UNKNOWN
32
32
  Classifier: Development Status :: 5 - Production/Stable
Binary file
@@ -99,6 +99,7 @@ EXCLUDE = {
99
99
  'deserialize',
100
100
  'get',
101
101
  'set_image_dim_ordering',
102
+ 'normalize_data_format',
102
103
  'image_dim_ordering',
103
104
  'get_variable_shape',
104
105
  }
@@ -114,7 +115,7 @@ EXCLUDE = {
114
115
  PAGES = [
115
116
  {
116
117
  'page': 'models/sequential.md',
117
- 'functions': [
118
+ 'methods': [
118
119
  models.Sequential.compile,
119
120
  models.Sequential.fit,
120
121
  models.Sequential.evaluate,
@@ -130,7 +131,7 @@ PAGES = [
130
131
  },
131
132
  {
132
133
  'page': 'models/model.md',
133
- 'functions': [
134
+ 'methods': [
134
135
  models.Model.compile,
135
136
  models.Model.fit,
136
137
  models.Model.evaluate,
@@ -158,6 +159,9 @@ PAGES = [
158
159
  layers.Lambda,
159
160
  layers.ActivityRegularization,
160
161
  layers.Masking,
162
+ layers.SpatialDropout1D,
163
+ layers.SpatialDropout2D,
164
+ layers.SpatialDropout3D,
161
165
  ],
162
166
  },
163
167
  {
@@ -193,6 +197,8 @@ PAGES = [
193
197
  layers.GlobalAveragePooling1D,
194
198
  layers.GlobalMaxPooling2D,
195
199
  layers.GlobalAveragePooling2D,
200
+ layers.GlobalMaxPooling3D,
201
+ layers.GlobalAveragePooling3D,
196
202
  ],
197
203
  },
198
204
  {
@@ -336,32 +342,6 @@ PAGES = [
336
342
  ROOT = 'http://keras.io/'
337
343
 
338
344
 
339
- def get_earliest_class_that_defined_member(member, cls):
340
- ancestors = get_classes_ancestors([cls])
341
- result = None
342
- for ancestor in ancestors:
343
- if member in dir(ancestor):
344
- result = ancestor
345
- if not result:
346
- return cls
347
- return result
348
-
349
-
350
- def get_classes_ancestors(classes):
351
- ancestors = []
352
- for cls in classes:
353
- ancestors += cls.__bases__
354
- filtered_ancestors = []
355
- for ancestor in ancestors:
356
- if ancestor.__name__ in ['object']:
357
- continue
358
- filtered_ancestors.append(ancestor)
359
- if filtered_ancestors:
360
- return filtered_ancestors + get_classes_ancestors(filtered_ancestors)
361
- else:
362
- return filtered_ancestors
363
-
364
-
365
345
  def get_function_signature(function, method=True):
366
346
  wrapped = getattr(function, '_original_function', None)
367
347
  if wrapped is None:
@@ -390,10 +370,6 @@ def get_function_signature(function, method=True):
390
370
  signature = st[:-2] + ')'
391
371
  else:
392
372
  signature = st + ')'
393
-
394
- if not method:
395
- # Prepend the module name.
396
- signature = clean_module_name(function.__module__) + '.' + signature
397
373
  return post_process_signature(signature)
398
374
 
399
375
 
@@ -404,12 +380,15 @@ def get_class_signature(cls):
404
380
  except (TypeError, AttributeError):
405
381
  # in case the class inherits from object and does not
406
382
  # define __init__
407
- class_signature = clean_module_name(cls.__module__) + '.' + cls.__name__ + '()'
383
+ class_signature = "{clean_module_name}.{cls_name}()".format(
384
+ clean_module_name=clean_module_name(cls.__module__),
385
+ cls_name=cls.__name__
386
+ )
408
387
  return post_process_signature(class_signature)
409
388
 
410
389
 
411
390
  def post_process_signature(signature):
412
- parts = re.split('\.(?!\d)', signature)
391
+ parts = re.split(r'\.(?!\d)', signature)
413
392
  if len(parts) >= 4:
414
393
  if parts[1] == 'layers':
415
394
  signature = 'keras.layers.' + '.'.join(parts[3:])
@@ -454,7 +433,7 @@ def code_snippet(snippet):
454
433
 
455
434
 
456
435
  def count_leading_spaces(s):
457
- ws = re.search('\S', s)
436
+ ws = re.search(r'\S', s)
458
437
  if ws:
459
438
  return ws.start()
460
439
  else:
@@ -463,7 +442,8 @@ def count_leading_spaces(s):
463
442
 
464
443
  def process_list_block(docstring, starting_point, leading_spaces, marker):
465
444
  ending_point = docstring.find('\n\n', starting_point)
466
- block = docstring[starting_point:None if ending_point == -1 else ending_point - 1]
445
+ block = docstring[starting_point:(None if ending_point == -1 else
446
+ ending_point - 1)]
467
447
  # Place marker for later reinjection.
468
448
  docstring = docstring.replace(block, marker)
469
449
  lines = block.split('\n')
@@ -591,7 +571,6 @@ for subdir, dirs, fnames in os.walk('templates'):
591
571
  shutil.copy(fpath, new_fpath)
592
572
 
593
573
 
594
- # Take care of index page.
595
574
  def read_file(path):
596
575
  with open(path) as f:
597
576
  return f.read()
@@ -611,9 +590,10 @@ def collect_class_methods(cls, methods):
611
590
  def render_function(function, method=True):
612
591
  subblocks = []
613
592
  signature = get_function_signature(function, method=method)
614
- signature = signature.replace(function.__module__ + '.', '')
615
- level = 3
616
- subblocks.append('#' * level + ' ' + function.__name__ + '\n')
593
+ if method:
594
+ signature = signature.replace(
595
+ clean_module_name(function.__module__) + '.', '')
596
+ subblocks.append('### ' + function.__name__ + '\n')
617
597
  subblocks.append(code_snippet(signature))
618
598
  docstring = function.__doc__
619
599
  if docstring:
@@ -621,6 +601,26 @@ def render_function(function, method=True):
621
601
  return '\n\n'.join(subblocks)
622
602
 
623
603
 
604
+ def read_page_data(page_data, type):
605
+ assert type in ['classes', 'functions', 'methods']
606
+ data = page_data.get(type, [])
607
+ for module in page_data.get('all_module_{}'.format(type), []):
608
+ module_data = []
609
+ for name in dir(module):
610
+ if name[0] == '_' or name in EXCLUDE:
611
+ continue
612
+ module_member = getattr(module, name)
613
+ if (inspect.isclass(module_member) and type == 'classes' or
614
+ inspect.isfunction(module_member) and type == 'functions'):
615
+ instance = module_member
616
+ if module.__name__ in instance.__module__:
617
+ if instance not in module_data:
618
+ module_data.append(instance)
619
+ module_data.sort(key=lambda x: id(x))
620
+ data += module_data
621
+ return data
622
+
623
+
624
624
  if __name__ == '__main__':
625
625
  readme = read_file('../README.md')
626
626
  index = read_file('templates/index.md')
@@ -630,22 +630,9 @@ if __name__ == '__main__':
630
630
 
631
631
  print('Generating docs for Keras %s.' % keras.__version__)
632
632
  for page_data in PAGES:
633
- blocks = []
634
- classes = page_data.get('classes', [])
635
- for module in page_data.get('all_module_classes', []):
636
- module_classes = []
637
- for name in dir(module):
638
- if name[0] == '_' or name in EXCLUDE:
639
- continue
640
- module_member = getattr(module, name)
641
- if inspect.isclass(module_member):
642
- cls = module_member
643
- if cls.__module__ == module.__name__:
644
- if cls not in module_classes:
645
- module_classes.append(cls)
646
- module_classes.sort(key=lambda x: id(x))
647
- classes += module_classes
633
+ classes = read_page_data(page_data, 'classes')
648
634
 
635
+ blocks = []
649
636
  for element in classes:
650
637
  if not isinstance(element, (list, tuple)):
651
638
  element = (element, [])
@@ -670,20 +657,12 @@ if __name__ == '__main__':
670
657
  [render_function(method, method=True) for method in methods]))
671
658
  blocks.append('\n'.join(subblocks))
672
659
 
673
- functions = page_data.get('functions', [])
674
- for module in page_data.get('all_module_functions', []):
675
- module_functions = []
676
- for name in dir(module):
677
- if name[0] == '_' or name in EXCLUDE:
678
- continue
679
- module_member = getattr(module, name)
680
- if inspect.isfunction(module_member):
681
- function = module_member
682
- if module.__name__ in function.__module__:
683
- if function not in module_functions:
684
- module_functions.append(function)
685
- module_functions.sort(key=lambda x: id(x))
686
- functions += module_functions
660
+ methods = read_page_data(page_data, 'methods')
661
+
662
+ for method in methods:
663
+ blocks.append(render_function(method, method=True))
664
+
665
+ functions = read_page_data(page_data, 'functions')
687
666
 
688
667
  for function in functions:
689
668
  blocks.append(render_function(function, method=False))
@@ -701,7 +680,8 @@ if __name__ == '__main__':
701
680
  if os.path.exists(path):
702
681
  template = read_file(path)
703
682
  assert '{{autogenerated}}' in template, ('Template found for ' + path +
704
- ' but missing {{autogenerated}} tag.')
683
+ ' but missing {{autogenerated}}'
684
+ ' tag.')
705
685
  mkdown = template.replace('{{autogenerated}}', mkdown)
706
686
  print('...inserting autogenerated content into template:', path)
707
687
  else:
Binary file
@@ -533,15 +533,6 @@ MobileNet model, with weights pre-trained on ImageNet.
533
533
 
534
534
  Note that this model only supports the data format `'channels_last'` (height, width, channels).
535
535
 
536
- To load a MobileNet model via `load_model`, import the custom object `relu6` and pass it to the `custom_objects` parameter.
537
-
538
- E.g.
539
-
540
- ```python
541
- model = load_model('mobilenet.h5', custom_objects={
542
- 'relu6': mobilenet.relu6})
543
- ```
544
-
545
536
  The default input size for this model is 224x224.
546
537
 
547
538
  ### Arguments
@@ -732,15 +723,6 @@ MobileNetV2 model, with weights pre-trained on ImageNet.
732
723
 
733
724
  Note that this model only supports the data format `'channels_last'` (height, width, channels).
734
725
 
735
- To load a MobileNetV2 model via `load_model`, import the custom object `relu6` and pass it to the `custom_objects` parameter.
736
-
737
- E.g.
738
-
739
- ```python
740
- model = load_model('mobilenet_v2.h5', custom_objects={
741
- 'relu6': mobilenetv2.relu6})
742
- ```
743
-
744
726
  The default input size for this model is 224x224.
745
727
 
746
728
  ### Arguments
@@ -445,7 +445,7 @@ model.reset_states()
445
445
  model.layers[0].reset_states()
446
446
  ```
447
447
 
448
- Notes that the methods `predict`, `fit`, `train_on_batch`, `predict_classes`, etc. will *all* update the states of the stateful layers in a model. This allows you to do not only stateful training, but also stateful prediction.
448
+ Note that the methods `predict`, `fit`, `train_on_batch`, `predict_classes`, etc. will *all* update the states of the stateful layers in a model. This allows you to do not only stateful training, but also stateful prediction.
449
449
 
450
450
  ---
451
451
 
@@ -624,4 +624,4 @@ import h5py
624
624
  ```
625
625
 
626
626
  If it imports without error it is installed otherwise you can find detailed
627
- installation instructions here: http://docs.h5py.org/en/latest/build.html
627
+ installation instructions here: http://docs.h5py.org/en/latest/build.html
@@ -263,6 +263,8 @@ from keras.layers import Dense, Dropout
263
263
  from keras.layers import Embedding
264
264
  from keras.layers import LSTM
265
265
 
266
+ max_features = 1024
267
+
266
268
  model = Sequential()
267
269
  model.add(Embedding(max_features, output_dim=256))
268
270
  model.add(LSTM(128))
@@ -285,6 +287,8 @@ from keras.layers import Dense, Dropout
285
287
  from keras.layers import Embedding
286
288
  from keras.layers import Conv1D, GlobalAveragePooling1D, MaxPooling1D
287
289
 
290
+ seq_length = 64
291
+
288
292
  model = Sequential()
289
293
  model.add(Conv1D(64, 3, activation='relu', input_shape=(seq_length, 100)))
290
294
  model.add(Conv1D(64, 3, activation='relu'))
@@ -2,12 +2,11 @@
2
2
 
3
3
  There are two main types of models available in Keras: [the Sequential model](/models/sequential), and [the Model class used with the functional API](/models/model).
4
4
 
5
- These models have a number of methods and attributes in common in common:
5
+ These models have a number of methods and attributes in common:
6
6
 
7
7
  - `model.layers` is a flattened list of the layers comprising the model.
8
8
  - `model.inputs` is the list of input tensors of the model.
9
9
  - `model.outputs` is the list of output tensors of the model.
10
-
11
10
  - `model.summary()` prints a summary representation of your model. Shortcut for [utils.print_summary](/utils/#print_summary)
12
11
  - `model.get_config()` returns a dictionary containing the configuration of the model. The model can be reinstantiated from its config via:
13
12
 
@@ -25,7 +25,7 @@ model.add(Dense(64, input_dim=64,
25
25
  ```python
26
26
  keras.regularizers.l1(0.)
27
27
  keras.regularizers.l2(0.)
28
- keras.regularizers.l1_l2(0.)
28
+ keras.regularizers.l1_l2(l1=0.01, l2=0.01)
29
29
  ```
30
30
 
31
31
  ## Developing new regularizers
@@ -43,4 +43,4 @@ model.add(Dense(64, input_dim=64,
43
43
  ```
44
44
 
45
45
  Alternatively, you can write your regularizers in an object-oriented way;
46
- see the [keras/regularizers.py](https://github.com/keras-team/keras/blob/master/keras/regularizers.py) module for examples.
46
+ see the [keras/regularizers.py](https://github.com/keras-team/keras/blob/master/keras/regularizers.py) module for examples.
@@ -11,6 +11,9 @@ Trains a simple convnet on the MNIST dataset.
11
11
  [cifar10_cnn.py](cifar10_cnn.py)
12
12
  Trains a simple deep CNN on the CIFAR10 small images dataset.
13
13
 
14
+ [cifar10_cnn_capsule.py](cifar10_cnn_capsule.py)
15
+ Trains a simple CNN-Capsule Network on the CIFAR10 small images dataset.
16
+
14
17
  [cifar10_resnet.py](cifar10_resnet.py)
15
18
  Trains a ResNet on the CIFAR10 small images dataset.
16
19
 
@@ -33,7 +36,10 @@ Trains a Siamese multi-layer perceptron on pairs of digits from the MNIST datase
33
36
  Trains a Stacked What-Where AutoEncoder built on residual blocks on the MNIST dataset.
34
37
 
35
38
  [mnist_transfer_cnn.py](mnist_transfer_cnn.py)
36
- Transfer learning toy example.
39
+ Transfer learning toy example on the MNIST dataset.
40
+
41
+ [mnist_denoising_autoencoder.py](mnist_denoising_autoencoder.py)
42
+ Trains a denoising autoencoder on the MNIST dataset.
37
43
 
38
44
  ----
39
45
 
@@ -66,6 +72,12 @@ Trains an LSTM model on the IMDB sentiment classification task.
66
72
  [lstm_stateful.py](lstm_stateful.py)
67
73
  Demonstrates how to use stateful RNNs to model long sequences efficiently.
68
74
 
75
+ [lstm_seq2seq.py](lstm_seq2seq.py)
76
+ Trains a basic character-level sequence-to-sequence model.
77
+
78
+ [lstm_seq2seq_restore.py](lstm_seq2seq_restore.py)
79
+ Restores a character-level sequence to sequence model from disk (saved by [lstm_seq2seq.py](lstm_seq2seq.py)) and uses it to generate predictions.
80
+
69
81
  [pretrained_word_embeddings.py](pretrained_word_embeddings.py)
70
82
  Loads pre-trained word embeddings (GloVe embeddings) into a frozen Keras Embedding layer, and uses it to train a text classification model on the 20 Newsgroup dataset.
71
83
 
@@ -120,4 +132,10 @@ Compares self-normalizing MLPs with regular MLPs.
120
132
  MNIST dataset with TFRecords, the standard TensorFlow data format.
121
133
 
122
134
  [mnist_dataset_api.py](mnist_dataset_api.py)
123
- MNIST dataset with TensorFlow's Dataset API.
135
+ MNIST dataset with TensorFlow's Dataset API.
136
+
137
+ [cifar10_cnn_tfaugment2d.py](cifar10_cnn_tfaugment2d.py)
138
+ Trains a simple deep CNN on the CIFAR10 small images dataset using Tensorflow internal augmentation APIs.
139
+
140
+ [tensorboard_embeddings_mnist.py](tensorboard_embeddings_mnist.py)
141
+ Trains a simple convnet on the MNIST dataset and embeds test data which can be later visualized using TensorBoard's Embedding Projector.
@@ -24,7 +24,7 @@ Four digits reversed:
24
24
 
25
25
  Five digits reversed:
26
26
  + One layer LSTM (128 HN), 550k training examples = 99% train/test accuracy in 30 epochs
27
- '''
27
+ ''' # noqa
28
28
 
29
29
  from __future__ import print_function
30
30
  from keras.models import Sequential
@@ -17,7 +17,8 @@ from __future__ import print_function
17
17
 
18
18
  from keras.models import Sequential, Model
19
19
  from keras.layers.embeddings import Embedding
20
- from keras.layers import Input, Activation, Dense, Permute, Dropout, add, dot, concatenate
20
+ from keras.layers import Input, Activation, Dense, Permute, Dropout
21
+ from keras.layers import add, dot, concatenate
21
22
  from keras.layers import LSTM
22
23
  from keras.utils.data_utils import get_file
23
24
  from keras.preprocessing.sequence import pad_sequences
@@ -79,7 +80,8 @@ def get_stories(f, only_supporting=False, max_length=None):
79
80
  '''
80
81
  data = parse_stories(f.readlines(), only_supporting=only_supporting)
81
82
  flatten = lambda data: reduce(lambda x, y: x + y, data)
82
- data = [(flatten(story), q, answer) for story, q, answer in data if not max_length or len(flatten(story)) < max_length]
83
+ data = [(flatten(story), q, answer) for story, q, answer in data
84
+ if not max_length or len(flatten(story)) < max_length]
83
85
  return data
84
86
 
85
87
 
@@ -94,19 +96,24 @@ def vectorize_stories(data):
94
96
  np.array(answers))
95
97
 
96
98
  try:
97
- path = get_file('babi-tasks-v1-2.tar.gz', origin='https://s3.amazonaws.com/text-datasets/babi_tasks_1-20_v1-2.tar.gz')
99
+ path = get_file('babi-tasks-v1-2.tar.gz',
100
+ origin='https://s3.amazonaws.com/text-datasets/'
101
+ 'babi_tasks_1-20_v1-2.tar.gz')
98
102
  except:
99
103
  print('Error downloading dataset, please download it manually:\n'
100
- '$ wget http://www.thespermwhale.com/jaseweston/babi/tasks_1-20_v1-2.tar.gz\n'
104
+ '$ wget http://www.thespermwhale.com/jaseweston/babi/tasks_1-20_v1-2'
105
+ '.tar.gz\n'
101
106
  '$ mv tasks_1-20_v1-2.tar.gz ~/.keras/datasets/babi-tasks-v1-2.tar.gz')
102
107
  raise
103
108
 
104
109
 
105
110
  challenges = {
106
111
  # QA1 with 10,000 samples
107
- 'single_supporting_fact_10k': 'tasks_1-20_v1-2/en-10k/qa1_single-supporting-fact_{}.txt',
112
+ 'single_supporting_fact_10k': 'tasks_1-20_v1-2/en-10k/qa1_'
113
+ 'single-supporting-fact_{}.txt',
108
114
  # QA2 with 10,000 samples
109
- 'two_supporting_facts_10k': 'tasks_1-20_v1-2/en-10k/qa2_two-supporting-facts_{}.txt',
115
+ 'two_supporting_facts_10k': 'tasks_1-20_v1-2/en-10k/qa2_'
116
+ 'two-supporting-facts_{}.txt',
110
117
  }
111
118
  challenge_type = 'single_supporting_fact_10k'
112
119
  challenge = challenges[challenge_type]
@@ -123,7 +123,8 @@ def get_stories(f, only_supporting=False, max_length=None):
123
123
  '''
124
124
  data = parse_stories(f.readlines(), only_supporting=only_supporting)
125
125
  flatten = lambda data: reduce(lambda x, y: x + y, data)
126
- data = [(flatten(story), q, answer) for story, q, answer in data if not max_length or len(flatten(story)) < max_length]
126
+ data = [(flatten(story), q, answer) for story, q, answer in data
127
+ if not max_length or len(flatten(story)) < max_length]
127
128
  return data
128
129
 
129
130
 
@@ -140,7 +141,8 @@ def vectorize_stories(data, word_idx, story_maxlen, query_maxlen):
140
141
  xs.append(x)
141
142
  xqs.append(xq)
142
143
  ys.append(y)
143
- return pad_sequences(xs, maxlen=story_maxlen), pad_sequences(xqs, maxlen=query_maxlen), np.array(ys)
144
+ return (pad_sequences(xs, maxlen=story_maxlen),
145
+ pad_sequences(xqs, maxlen=query_maxlen), np.array(ys))
144
146
 
145
147
  RNN = recurrent.LSTM
146
148
  EMBED_HIDDEN_SIZE = 50
@@ -154,10 +156,13 @@ print('RNN / Embed / Sent / Query = {}, {}, {}, {}'.format(RNN,
154
156
  QUERY_HIDDEN_SIZE))
155
157
 
156
158
  try:
157
- path = get_file('babi-tasks-v1-2.tar.gz', origin='https://s3.amazonaws.com/text-datasets/babi_tasks_1-20_v1-2.tar.gz')
159
+ path = get_file('babi-tasks-v1-2.tar.gz',
160
+ origin='https://s3.amazonaws.com/text-datasets/'
161
+ 'babi_tasks_1-20_v1-2.tar.gz')
158
162
  except:
159
163
  print('Error downloading dataset, please download it manually:\n'
160
- '$ wget http://www.thespermwhale.com/jaseweston/babi/tasks_1-20_v1-2.tar.gz\n'
164
+ '$ wget http://www.thespermwhale.com/jaseweston/babi/tasks_1-20_v1-2'
165
+ '.tar.gz\n'
161
166
  '$ mv tasks_1-20_v1-2.tar.gz ~/.keras/datasets/babi-tasks-v1-2.tar.gz')
162
167
  raise
163
168