keras 2.2.2__tar.gz → 2.2.3__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 (295) hide show
  1. {Keras-2.2.2 → Keras-2.2.3/Keras.egg-info}/PKG-INFO +2 -2
  2. {Keras-2.2.2 → Keras-2.2.3}/Keras.egg-info/SOURCES.txt +8 -3
  3. {Keras-2.2.2 → Keras-2.2.3}/Keras.egg-info/requires.txt +3 -2
  4. {Keras-2.2.2/Keras.egg-info → Keras-2.2.3}/PKG-INFO +2 -2
  5. {Keras-2.2.2 → Keras-2.2.3}/docs/autogen.py +1 -0
  6. {Keras-2.2.2 → Keras-2.2.3}/docs/templates/applications.md +23 -19
  7. {Keras-2.2.2 → Keras-2.2.3}/docs/templates/datasets.md +3 -3
  8. {Keras-2.2.2 → Keras-2.2.3}/docs/templates/getting-started/faq.md +34 -19
  9. {Keras-2.2.2 → Keras-2.2.3}/docs/templates/layers/writing-your-own-keras-layers.md +32 -1
  10. Keras-2.2.3/docs/templates/visualization.md +53 -0
  11. {Keras-2.2.2 → Keras-2.2.3}/docs/templates/why-use-keras.md +9 -6
  12. {Keras-2.2.2 → Keras-2.2.3}/examples/cifar10_cnn_capsule.py +3 -3
  13. {Keras-2.2.2 → Keras-2.2.3}/examples/conv_filter_visualization.py +5 -2
  14. {Keras-2.2.2 → Keras-2.2.3}/examples/deep_dream.py +2 -1
  15. {Keras-2.2.2 → Keras-2.2.3}/examples/image_ocr.py +98 -55
  16. {Keras-2.2.2 → Keras-2.2.3}/examples/imdb_fasttext.py +8 -4
  17. {Keras-2.2.2 → Keras-2.2.3}/examples/imdb_lstm.py +2 -1
  18. {Keras-2.2.2 → Keras-2.2.3}/examples/lstm_text_generation.py +6 -5
  19. {Keras-2.2.2 → Keras-2.2.3}/examples/mnist_acgan.py +21 -20
  20. {Keras-2.2.2 → Keras-2.2.3}/examples/mnist_hierarchical_rnn.py +4 -2
  21. {Keras-2.2.2 → Keras-2.2.3}/examples/mnist_net2net.py +3 -2
  22. {Keras-2.2.2 → Keras-2.2.3}/examples/mnist_siamese.py +5 -3
  23. {Keras-2.2.2 → Keras-2.2.3}/examples/mnist_sklearn_wrapper.py +1 -1
  24. {Keras-2.2.2 → Keras-2.2.3}/examples/mnist_tfrecord.py +4 -3
  25. {Keras-2.2.2 → Keras-2.2.3}/examples/neural_doodle.py +12 -6
  26. {Keras-2.2.2 → Keras-2.2.3}/examples/neural_style_transfer.py +14 -7
  27. {Keras-2.2.2 → Keras-2.2.3}/examples/pretrained_word_embeddings.py +2 -2
  28. {Keras-2.2.2 → Keras-2.2.3}/examples/variational_autoencoder.py +1 -1
  29. {Keras-2.2.2 → Keras-2.2.3}/examples/variational_autoencoder_deconv.py +1 -1
  30. {Keras-2.2.2 → Keras-2.2.3}/keras/__init__.py +1 -1
  31. {Keras-2.2.2 → Keras-2.2.3}/keras/activations.py +22 -8
  32. Keras-2.2.3/keras/applications/__init__.py +42 -0
  33. Keras-2.2.3/keras/applications/densenet.py +31 -0
  34. Keras-2.2.3/keras/applications/imagenet_utils.py +19 -0
  35. Keras-2.2.3/keras/applications/inception_resnet_v2.py +21 -0
  36. Keras-2.2.3/keras/applications/inception_v3.py +21 -0
  37. Keras-2.2.3/keras/applications/mobilenet.py +21 -0
  38. Keras-2.2.3/keras/applications/mobilenet_v2.py +21 -0
  39. Keras-2.2.3/keras/applications/mobilenetv2.py +2 -0
  40. Keras-2.2.3/keras/applications/nasnet.py +26 -0
  41. Keras-2.2.3/keras/applications/resnet50.py +21 -0
  42. Keras-2.2.3/keras/applications/vgg16.py +21 -0
  43. Keras-2.2.3/keras/applications/vgg19.py +21 -0
  44. Keras-2.2.3/keras/applications/xception.py +21 -0
  45. {Keras-2.2.2 → Keras-2.2.3}/keras/backend/cntk_backend.py +81 -63
  46. {Keras-2.2.2 → Keras-2.2.3}/keras/backend/tensorflow_backend.py +182 -92
  47. {Keras-2.2.2 → Keras-2.2.3}/keras/backend/theano_backend.py +165 -32
  48. {Keras-2.2.2 → Keras-2.2.3}/keras/callbacks.py +108 -31
  49. {Keras-2.2.2 → Keras-2.2.3}/keras/constraints.py +2 -1
  50. {Keras-2.2.2 → Keras-2.2.3}/keras/datasets/boston_housing.py +7 -7
  51. {Keras-2.2.2 → Keras-2.2.3}/keras/datasets/imdb.py +8 -5
  52. {Keras-2.2.2 → Keras-2.2.3}/keras/datasets/reuters.py +4 -3
  53. {Keras-2.2.2 → Keras-2.2.3}/keras/engine/input_layer.py +1 -0
  54. {Keras-2.2.2 → Keras-2.2.3}/keras/engine/network.py +35 -22
  55. {Keras-2.2.2 → Keras-2.2.3}/keras/engine/saving.py +345 -213
  56. {Keras-2.2.2 → Keras-2.2.3}/keras/engine/sequential.py +19 -12
  57. {Keras-2.2.2 → Keras-2.2.3}/keras/engine/training.py +23 -20
  58. {Keras-2.2.2 → Keras-2.2.3}/keras/engine/training_generator.py +12 -10
  59. {Keras-2.2.2 → Keras-2.2.3}/keras/engine/training_utils.py +19 -0
  60. {Keras-2.2.2 → Keras-2.2.3}/keras/initializers.py +17 -5
  61. {Keras-2.2.2 → Keras-2.2.3}/keras/layers/advanced_activations.py +41 -11
  62. {Keras-2.2.2 → Keras-2.2.3}/keras/layers/convolutional.py +327 -473
  63. {Keras-2.2.2 → Keras-2.2.3}/keras/layers/convolutional_recurrent.py +79 -61
  64. {Keras-2.2.2 → Keras-2.2.3}/keras/layers/core.py +12 -6
  65. {Keras-2.2.2 → Keras-2.2.3}/keras/layers/cudnn_recurrent.py +21 -11
  66. {Keras-2.2.2 → Keras-2.2.3}/keras/layers/embeddings.py +20 -14
  67. {Keras-2.2.2 → Keras-2.2.3}/keras/layers/local.py +12 -8
  68. {Keras-2.2.2 → Keras-2.2.3}/keras/layers/merge.py +16 -8
  69. {Keras-2.2.2 → Keras-2.2.3}/keras/layers/noise.py +2 -1
  70. {Keras-2.2.2 → Keras-2.2.3}/keras/layers/normalization.py +8 -4
  71. {Keras-2.2.2 → Keras-2.2.3}/keras/layers/pooling.py +125 -22
  72. {Keras-2.2.2 → Keras-2.2.3}/keras/layers/recurrent.py +163 -74
  73. {Keras-2.2.2 → Keras-2.2.3}/keras/layers/wrappers.py +26 -5
  74. {Keras-2.2.2 → Keras-2.2.3}/keras/legacy/interfaces.py +15 -11
  75. {Keras-2.2.2 → Keras-2.2.3}/keras/legacy/layers.py +16 -15
  76. {Keras-2.2.2 → Keras-2.2.3}/keras/metrics.py +5 -2
  77. {Keras-2.2.2 → Keras-2.2.3}/keras/models.py +2 -2
  78. {Keras-2.2.2 → Keras-2.2.3}/keras/optimizers.py +20 -12
  79. Keras-2.2.3/keras/preprocessing/image.py +471 -0
  80. Keras-2.2.3/keras/preprocessing/sequence.py +78 -0
  81. {Keras-2.2.2 → Keras-2.2.3}/keras/utils/__init__.py +1 -0
  82. {Keras-2.2.2 → Keras-2.2.3}/keras/utils/conv_utils.py +15 -10
  83. {Keras-2.2.2 → Keras-2.2.3}/keras/utils/data_utils.py +160 -244
  84. {Keras-2.2.2 → Keras-2.2.3}/keras/utils/generic_utils.py +57 -5
  85. Keras-2.2.3/keras/utils/io_utils.py +349 -0
  86. {Keras-2.2.2 → Keras-2.2.3}/keras/utils/multi_gpu_utils.py +16 -1
  87. {Keras-2.2.2 → Keras-2.2.3}/keras/utils/np_utils.py +4 -2
  88. {Keras-2.2.2 → Keras-2.2.3}/keras/utils/test_utils.py +7 -31
  89. {Keras-2.2.2 → Keras-2.2.3}/setup.py +5 -4
  90. Keras-2.2.3/tests/conftest.py +13 -0
  91. {Keras-2.2.2 → Keras-2.2.3}/tests/integration_tests/applications_test.py +10 -9
  92. {Keras-2.2.2/tests/keras → Keras-2.2.3/tests/integration_tests}/preprocessing/image_test.py +36 -49
  93. {Keras-2.2.2/tests/keras → Keras-2.2.3/tests/integration_tests}/preprocessing/text_test.py +10 -4
  94. {Keras-2.2.2 → Keras-2.2.3}/tests/integration_tests/test_image_data_tasks.py +1 -2
  95. {Keras-2.2.2 → Keras-2.2.3}/tests/integration_tests/test_temporal_data_tasks.py +19 -18
  96. Keras-2.2.3/tests/integration_tests/test_tensorflow_integration.py +50 -0
  97. {Keras-2.2.2 → Keras-2.2.3}/tests/integration_tests/test_vector_data_tasks.py +1 -4
  98. {Keras-2.2.2 → Keras-2.2.3}/tests/keras/activations_test.py +29 -0
  99. {Keras-2.2.2 → Keras-2.2.3}/tests/keras/backend/backend_test.py +502 -390
  100. Keras-2.2.3/tests/keras/backend/reference_operations.py +571 -0
  101. {Keras-2.2.2 → Keras-2.2.3}/tests/keras/constraints_test.py +0 -5
  102. {Keras-2.2.2 → Keras-2.2.3}/tests/keras/engine/test_topology.py +54 -63
  103. {Keras-2.2.2 → Keras-2.2.3}/tests/keras/engine/test_training.py +90 -37
  104. {Keras-2.2.2 → Keras-2.2.3}/tests/keras/initializers_test.py +4 -2
  105. Keras-2.2.3/tests/keras/layers/advanced_activations_test.py +80 -0
  106. Keras-2.2.3/tests/keras/layers/convolutional_recurrent_test.py +162 -0
  107. {Keras-2.2.2 → Keras-2.2.3}/tests/keras/layers/convolutional_test.py +467 -374
  108. {Keras-2.2.2 → Keras-2.2.3}/tests/keras/layers/core_test.py +32 -14
  109. {Keras-2.2.2 → Keras-2.2.3}/tests/keras/layers/cudnn_recurrent_test.py +2 -12
  110. {Keras-2.2.2 → Keras-2.2.3}/tests/keras/layers/embeddings_test.py +23 -3
  111. {Keras-2.2.2 → Keras-2.2.3}/tests/keras/layers/local_test.py +0 -3
  112. {Keras-2.2.2 → Keras-2.2.3}/tests/keras/layers/merge_test.py +10 -10
  113. {Keras-2.2.2 → Keras-2.2.3}/tests/keras/layers/noise_test.py +0 -4
  114. {Keras-2.2.2 → Keras-2.2.3}/tests/keras/layers/normalization_test.py +12 -15
  115. Keras-2.2.3/tests/keras/layers/pooling_test.py +153 -0
  116. {Keras-2.2.2 → Keras-2.2.3}/tests/keras/layers/recurrent_test.py +75 -31
  117. {Keras-2.2.2 → Keras-2.2.3}/tests/keras/layers/wrappers_test.py +14 -24
  118. {Keras-2.2.2 → Keras-2.2.3}/tests/keras/legacy/interface_test.py +148 -114
  119. {Keras-2.2.2 → Keras-2.2.3}/tests/keras/legacy/layers_test.py +0 -3
  120. {Keras-2.2.2 → Keras-2.2.3}/tests/keras/metrics_test.py +39 -20
  121. {Keras-2.2.2 → Keras-2.2.3}/tests/keras/optimizers_test.py +4 -15
  122. {Keras-2.2.2 → Keras-2.2.3}/tests/keras/test_callbacks.py +221 -205
  123. {Keras-2.2.2 → Keras-2.2.3}/tests/keras/test_sequential_model.py +31 -28
  124. {Keras-2.2.2 → Keras-2.2.3}/tests/keras/utils/data_utils_test.py +46 -16
  125. {Keras-2.2.2 → Keras-2.2.3}/tests/keras/utils/generic_utils_test.py +4 -4
  126. {Keras-2.2.2 → Keras-2.2.3}/tests/keras/utils/io_utils_test.py +93 -10
  127. {Keras-2.2.2 → Keras-2.2.3}/tests/keras/utils/layer_utils_test.py +2 -3
  128. {Keras-2.2.2 → Keras-2.2.3}/tests/keras/utils/multi_gpu_test.py +33 -5
  129. {Keras-2.2.2 → Keras-2.2.3}/tests/keras/utils/vis_utils_test.py +1 -1
  130. {Keras-2.2.2 → Keras-2.2.3}/tests/keras/wrappers/scikit_learn_test.py +9 -4
  131. {Keras-2.2.2 → Keras-2.2.3}/tests/test_documentation.py +7 -4
  132. {Keras-2.2.2 → Keras-2.2.3}/tests/test_dynamic_trainability.py +0 -4
  133. {Keras-2.2.2 → Keras-2.2.3}/tests/test_loss_masking.py +0 -3
  134. {Keras-2.2.2 → Keras-2.2.3}/tests/test_loss_weighting.py +34 -26
  135. Keras-2.2.3/tests/test_model_pickling.py +161 -0
  136. {Keras-2.2.2 → Keras-2.2.3}/tests/test_model_saving.py +37 -38
  137. {Keras-2.2.2 → Keras-2.2.3}/tests/test_multiprocessing.py +50 -14
  138. Keras-2.2.2/docs/templates/visualization.md +0 -25
  139. Keras-2.2.2/keras/applications/__init__.py +0 -28
  140. Keras-2.2.2/keras/applications/densenet.py +0 -11
  141. Keras-2.2.2/keras/applications/imagenet_utils.py +0 -10
  142. Keras-2.2.2/keras/applications/inception_resnet_v2.py +0 -9
  143. Keras-2.2.2/keras/applications/inception_v3.py +0 -9
  144. Keras-2.2.2/keras/applications/mobilenet.py +0 -9
  145. Keras-2.2.2/keras/applications/mobilenetv2.py +0 -9
  146. Keras-2.2.2/keras/applications/nasnet.py +0 -10
  147. Keras-2.2.2/keras/applications/resnet50.py +0 -9
  148. Keras-2.2.2/keras/applications/vgg16.py +0 -9
  149. Keras-2.2.2/keras/applications/vgg19.py +0 -9
  150. Keras-2.2.2/keras/applications/xception.py +0 -9
  151. Keras-2.2.2/keras/preprocessing/image.py +0 -25
  152. Keras-2.2.2/keras/preprocessing/sequence.py +0 -13
  153. Keras-2.2.2/keras/utils/io_utils.py +0 -157
  154. Keras-2.2.2/tests/keras/backend/reference_operations.py +0 -164
  155. Keras-2.2.2/tests/keras/layers/advanced_activations_test.py +0 -54
  156. Keras-2.2.2/tests/keras/layers/convolutional_recurrent_test.py +0 -156
  157. {Keras-2.2.2 → Keras-2.2.3}/CONTRIBUTING.md +0 -0
  158. {Keras-2.2.2 → Keras-2.2.3}/Keras.egg-info/dependency_links.txt +0 -0
  159. {Keras-2.2.2 → Keras-2.2.3}/Keras.egg-info/top_level.txt +0 -0
  160. {Keras-2.2.2 → Keras-2.2.3}/LICENSE +0 -0
  161. {Keras-2.2.2 → Keras-2.2.3}/MANIFEST.in +0 -0
  162. {Keras-2.2.2 → Keras-2.2.3}/README.md +0 -0
  163. {Keras-2.2.2 → Keras-2.2.3}/docs/README.md +0 -0
  164. {Keras-2.2.2 → Keras-2.2.3}/docs/__init__.py +0 -0
  165. {Keras-2.2.2 → Keras-2.2.3}/docs/__init__.pyc +0 -0
  166. {Keras-2.2.2 → Keras-2.2.3}/docs/autogen.pyc +0 -0
  167. {Keras-2.2.2 → Keras-2.2.3}/docs/mkdocs.yml +0 -0
  168. {Keras-2.2.2 → Keras-2.2.3}/docs/templates/activations.md +0 -0
  169. {Keras-2.2.2 → Keras-2.2.3}/docs/templates/backend.md +0 -0
  170. {Keras-2.2.2 → Keras-2.2.3}/docs/templates/callbacks.md +0 -0
  171. {Keras-2.2.2 → Keras-2.2.3}/docs/templates/constraints.md +0 -0
  172. {Keras-2.2.2 → Keras-2.2.3}/docs/templates/getting-started/functional-api-guide.md +0 -0
  173. {Keras-2.2.2 → Keras-2.2.3}/docs/templates/getting-started/sequential-model-guide.md +0 -0
  174. {Keras-2.2.2 → Keras-2.2.3}/docs/templates/index.md +0 -0
  175. {Keras-2.2.2 → Keras-2.2.3}/docs/templates/initializers.md +0 -0
  176. {Keras-2.2.2 → Keras-2.2.3}/docs/templates/layers/about-keras-layers.md +0 -0
  177. {Keras-2.2.2 → Keras-2.2.3}/docs/templates/losses.md +0 -0
  178. {Keras-2.2.2 → Keras-2.2.3}/docs/templates/metrics.md +0 -0
  179. {Keras-2.2.2 → Keras-2.2.3}/docs/templates/models/about-keras-models.md +0 -0
  180. {Keras-2.2.2 → Keras-2.2.3}/docs/templates/models/model.md +0 -0
  181. {Keras-2.2.2 → Keras-2.2.3}/docs/templates/models/sequential.md +0 -0
  182. {Keras-2.2.2 → Keras-2.2.3}/docs/templates/optimizers.md +0 -0
  183. {Keras-2.2.2 → Keras-2.2.3}/docs/templates/preprocessing/image.md +0 -0
  184. {Keras-2.2.2 → Keras-2.2.3}/docs/templates/preprocessing/text.md +0 -0
  185. {Keras-2.2.2 → Keras-2.2.3}/docs/templates/regularizers.md +0 -0
  186. {Keras-2.2.2 → Keras-2.2.3}/docs/templates/scikit-learn-api.md +0 -0
  187. {Keras-2.2.2 → Keras-2.2.3}/examples/README.md +0 -0
  188. {Keras-2.2.2 → Keras-2.2.3}/examples/addition_rnn.py +0 -0
  189. {Keras-2.2.2 → Keras-2.2.3}/examples/antirectifier.py +0 -0
  190. {Keras-2.2.2 → Keras-2.2.3}/examples/babi_memnn.py +0 -0
  191. {Keras-2.2.2 → Keras-2.2.3}/examples/babi_rnn.py +0 -0
  192. {Keras-2.2.2 → Keras-2.2.3}/examples/cifar10_cnn.py +0 -0
  193. {Keras-2.2.2 → Keras-2.2.3}/examples/cifar10_cnn_tfaugment2d.py +0 -0
  194. {Keras-2.2.2 → Keras-2.2.3}/examples/cifar10_resnet.py +0 -0
  195. {Keras-2.2.2 → Keras-2.2.3}/examples/conv_lstm.py +0 -0
  196. {Keras-2.2.2 → Keras-2.2.3}/examples/imdb_bidirectional_lstm.py +0 -0
  197. {Keras-2.2.2 → Keras-2.2.3}/examples/imdb_cnn.py +0 -0
  198. {Keras-2.2.2 → Keras-2.2.3}/examples/imdb_cnn_lstm.py +0 -0
  199. {Keras-2.2.2 → Keras-2.2.3}/examples/lstm_seq2seq.py +0 -0
  200. {Keras-2.2.2 → Keras-2.2.3}/examples/lstm_seq2seq_restore.py +0 -0
  201. {Keras-2.2.2 → Keras-2.2.3}/examples/lstm_stateful.py +0 -0
  202. {Keras-2.2.2 → Keras-2.2.3}/examples/mnist_cnn.py +0 -0
  203. {Keras-2.2.2 → Keras-2.2.3}/examples/mnist_dataset_api.py +0 -0
  204. {Keras-2.2.2 → Keras-2.2.3}/examples/mnist_denoising_autoencoder.py +0 -0
  205. {Keras-2.2.2 → Keras-2.2.3}/examples/mnist_irnn.py +0 -0
  206. {Keras-2.2.2 → Keras-2.2.3}/examples/mnist_mlp.py +0 -0
  207. {Keras-2.2.2 → Keras-2.2.3}/examples/mnist_swwae.py +0 -0
  208. {Keras-2.2.2 → Keras-2.2.3}/examples/mnist_transfer_cnn.py +0 -0
  209. {Keras-2.2.2 → Keras-2.2.3}/examples/reuters_mlp.py +0 -0
  210. {Keras-2.2.2 → Keras-2.2.3}/examples/reuters_mlp_relu_vs_selu.py +0 -0
  211. {Keras-2.2.2 → Keras-2.2.3}/examples/tensorboard_embeddings_mnist.py +0 -0
  212. {Keras-2.2.2 → Keras-2.2.3}/keras/backend/__init__.py +0 -0
  213. {Keras-2.2.2 → Keras-2.2.3}/keras/backend/common.py +0 -0
  214. {Keras-2.2.2 → Keras-2.2.3}/keras/datasets/__init__.py +0 -0
  215. {Keras-2.2.2 → Keras-2.2.3}/keras/datasets/cifar.py +0 -0
  216. {Keras-2.2.2 → Keras-2.2.3}/keras/datasets/cifar10.py +0 -0
  217. {Keras-2.2.2 → Keras-2.2.3}/keras/datasets/cifar100.py +0 -0
  218. {Keras-2.2.2 → Keras-2.2.3}/keras/datasets/fashion_mnist.py +0 -0
  219. {Keras-2.2.2 → Keras-2.2.3}/keras/datasets/mnist.py +0 -0
  220. {Keras-2.2.2 → Keras-2.2.3}/keras/engine/__init__.py +0 -0
  221. {Keras-2.2.2 → Keras-2.2.3}/keras/engine/base_layer.py +0 -0
  222. {Keras-2.2.2 → Keras-2.2.3}/keras/engine/topology.py +0 -0
  223. {Keras-2.2.2 → Keras-2.2.3}/keras/engine/training_arrays.py +0 -0
  224. {Keras-2.2.2 → Keras-2.2.3}/keras/layers/__init__.py +0 -0
  225. {Keras-2.2.2 → Keras-2.2.3}/keras/legacy/__init__.py +0 -0
  226. {Keras-2.2.2 → Keras-2.2.3}/keras/losses.py +0 -0
  227. {Keras-2.2.2 → Keras-2.2.3}/keras/objectives.py +0 -0
  228. {Keras-2.2.2 → Keras-2.2.3}/keras/preprocessing/__init__.py +0 -0
  229. {Keras-2.2.2 → Keras-2.2.3}/keras/preprocessing/text.py +0 -0
  230. {Keras-2.2.2 → Keras-2.2.3}/keras/regularizers.py +0 -0
  231. {Keras-2.2.2 → Keras-2.2.3}/keras/utils/layer_utils.py +0 -0
  232. {Keras-2.2.2 → Keras-2.2.3}/keras/utils/vis_utils.py +0 -0
  233. {Keras-2.2.2 → Keras-2.2.3}/keras/wrappers/__init__.py +0 -0
  234. {Keras-2.2.2 → Keras-2.2.3}/keras/wrappers/scikit_learn.py +0 -0
  235. {Keras-2.2.2 → Keras-2.2.3}/setup.cfg +0 -0
  236. {Keras-2.2.2 → Keras-2.2.3}/tests/__pycache__/test_doc_auto_generation.cpython-27-PYTEST.pyc +0 -0
  237. {Keras-2.2.2 → Keras-2.2.3}/tests/__pycache__/test_documentation.cpython-27-PYTEST.pyc +0 -0
  238. {Keras-2.2.2 → Keras-2.2.3}/tests/__pycache__/test_dynamic_trainability.cpython-27-PYTEST.pyc +0 -0
  239. {Keras-2.2.2 → Keras-2.2.3}/tests/__pycache__/test_loss_masking.cpython-27-PYTEST.pyc +0 -0
  240. {Keras-2.2.2 → Keras-2.2.3}/tests/__pycache__/test_loss_weighting.cpython-27-PYTEST.pyc +0 -0
  241. {Keras-2.2.2 → Keras-2.2.3}/tests/__pycache__/test_model_saving.cpython-27-PYTEST.pyc +0 -0
  242. {Keras-2.2.2 → Keras-2.2.3}/tests/__pycache__/test_multiprocessing.cpython-27-PYTEST.pyc +0 -0
  243. {Keras-2.2.2 → Keras-2.2.3}/tests/integration_tests/__pycache__/applications_test.cpython-27-PYTEST.pyc +0 -0
  244. {Keras-2.2.2 → Keras-2.2.3}/tests/integration_tests/__pycache__/imagenet_utils_test.cpython-27-PYTEST.pyc +0 -0
  245. {Keras-2.2.2 → Keras-2.2.3}/tests/integration_tests/__pycache__/test_datasets.cpython-27-PYTEST.pyc +0 -0
  246. {Keras-2.2.2 → Keras-2.2.3}/tests/integration_tests/__pycache__/test_image_data_tasks.cpython-27-PYTEST.pyc +0 -0
  247. {Keras-2.2.2 → Keras-2.2.3}/tests/integration_tests/__pycache__/test_temporal_data_tasks.cpython-27-PYTEST.pyc +0 -0
  248. {Keras-2.2.2 → Keras-2.2.3}/tests/integration_tests/__pycache__/test_vector_data_tasks.cpython-27-PYTEST.pyc +0 -0
  249. {Keras-2.2.2 → Keras-2.2.3}/tests/integration_tests/imagenet_utils_test.py +0 -0
  250. {Keras-2.2.2/tests/keras → Keras-2.2.3/tests/integration_tests}/preprocessing/sequence_test.py +0 -0
  251. {Keras-2.2.2 → Keras-2.2.3}/tests/integration_tests/test_datasets.py +0 -0
  252. {Keras-2.2.2 → Keras-2.2.3}/tests/keras/__pycache__/activations_test.cpython-27-PYTEST.pyc +0 -0
  253. {Keras-2.2.2 → Keras-2.2.3}/tests/keras/__pycache__/constraints_test.cpython-27-PYTEST.pyc +0 -0
  254. {Keras-2.2.2 → Keras-2.2.3}/tests/keras/__pycache__/initializers_test.cpython-27-PYTEST.pyc +0 -0
  255. {Keras-2.2.2 → Keras-2.2.3}/tests/keras/__pycache__/losses_test.cpython-27-PYTEST.pyc +0 -0
  256. {Keras-2.2.2 → Keras-2.2.3}/tests/keras/__pycache__/metrics_test.cpython-27-PYTEST.pyc +0 -0
  257. {Keras-2.2.2 → Keras-2.2.3}/tests/keras/__pycache__/optimizers_test.cpython-27-PYTEST.pyc +0 -0
  258. {Keras-2.2.2 → Keras-2.2.3}/tests/keras/__pycache__/regularizers_test.cpython-27-PYTEST.pyc +0 -0
  259. {Keras-2.2.2 → Keras-2.2.3}/tests/keras/__pycache__/test_callbacks.cpython-27-PYTEST.pyc +0 -0
  260. {Keras-2.2.2 → Keras-2.2.3}/tests/keras/__pycache__/test_sequential_model.cpython-27-PYTEST.pyc +0 -0
  261. {Keras-2.2.2 → Keras-2.2.3}/tests/keras/backend/__pycache__/backend_test.cpython-27-PYTEST.pyc +0 -0
  262. {Keras-2.2.2 → Keras-2.2.3}/tests/keras/backend/reference_operations.pyc +0 -0
  263. {Keras-2.2.2 → Keras-2.2.3}/tests/keras/engine/__pycache__/test_topology.cpython-27-PYTEST.pyc +0 -0
  264. {Keras-2.2.2 → Keras-2.2.3}/tests/keras/engine/__pycache__/test_training.cpython-27-PYTEST.pyc +0 -0
  265. {Keras-2.2.2 → Keras-2.2.3}/tests/keras/layers/__pycache__/advanced_activations_test.cpython-27-PYTEST.pyc +0 -0
  266. {Keras-2.2.2 → Keras-2.2.3}/tests/keras/layers/__pycache__/convolutional_recurrent_test.cpython-27-PYTEST.pyc +0 -0
  267. {Keras-2.2.2 → Keras-2.2.3}/tests/keras/layers/__pycache__/convolutional_test.cpython-27-PYTEST.pyc +0 -0
  268. {Keras-2.2.2 → Keras-2.2.3}/tests/keras/layers/__pycache__/core_test.cpython-27-PYTEST.pyc +0 -0
  269. {Keras-2.2.2 → Keras-2.2.3}/tests/keras/layers/__pycache__/cudnn_recurrent_test.cpython-27-PYTEST.pyc +0 -0
  270. {Keras-2.2.2 → Keras-2.2.3}/tests/keras/layers/__pycache__/embeddings_test.cpython-27-PYTEST.pyc +0 -0
  271. {Keras-2.2.2 → Keras-2.2.3}/tests/keras/layers/__pycache__/local_test.cpython-27-PYTEST.pyc +0 -0
  272. {Keras-2.2.2 → Keras-2.2.3}/tests/keras/layers/__pycache__/merge_test.cpython-27-PYTEST.pyc +0 -0
  273. {Keras-2.2.2 → Keras-2.2.3}/tests/keras/layers/__pycache__/noise_test.cpython-27-PYTEST.pyc +0 -0
  274. {Keras-2.2.2 → Keras-2.2.3}/tests/keras/layers/__pycache__/normalization_test.cpython-27-PYTEST.pyc +0 -0
  275. {Keras-2.2.2 → Keras-2.2.3}/tests/keras/layers/__pycache__/recurrent_test.cpython-27-PYTEST.pyc +0 -0
  276. {Keras-2.2.2 → Keras-2.2.3}/tests/keras/layers/__pycache__/wrappers_test.cpython-27-PYTEST.pyc +0 -0
  277. {Keras-2.2.2 → Keras-2.2.3}/tests/keras/legacy/__pycache__/interface_test.cpython-27-PYTEST.pyc +0 -0
  278. {Keras-2.2.2 → Keras-2.2.3}/tests/keras/legacy/__pycache__/layers_test.cpython-27-PYTEST.pyc +0 -0
  279. {Keras-2.2.2 → Keras-2.2.3}/tests/keras/losses_test.py +0 -0
  280. {Keras-2.2.2 → Keras-2.2.3}/tests/keras/preprocessing/__pycache__/image_test.cpython-27-PYTEST.pyc +0 -0
  281. {Keras-2.2.2 → Keras-2.2.3}/tests/keras/preprocessing/__pycache__/sequence_test.cpython-27-PYTEST.pyc +0 -0
  282. {Keras-2.2.2 → Keras-2.2.3}/tests/keras/preprocessing/__pycache__/text_test.cpython-27-PYTEST.pyc +0 -0
  283. {Keras-2.2.2 → Keras-2.2.3}/tests/keras/regularizers_test.py +0 -0
  284. {Keras-2.2.2 → Keras-2.2.3}/tests/keras/utils/__pycache__/conv_utils_test.cpython-27-PYTEST.pyc +0 -0
  285. {Keras-2.2.2 → Keras-2.2.3}/tests/keras/utils/__pycache__/data_utils_test.cpython-27-PYTEST.pyc +0 -0
  286. {Keras-2.2.2 → Keras-2.2.3}/tests/keras/utils/__pycache__/generic_utils_test.cpython-27-PYTEST.pyc +0 -0
  287. {Keras-2.2.2 → Keras-2.2.3}/tests/keras/utils/__pycache__/io_utils_test.cpython-27-PYTEST.pyc +0 -0
  288. {Keras-2.2.2 → Keras-2.2.3}/tests/keras/utils/__pycache__/layer_utils_test.cpython-27-PYTEST.pyc +0 -0
  289. {Keras-2.2.2 → Keras-2.2.3}/tests/keras/utils/__pycache__/multi_gpu_test.cpython-27-PYTEST.pyc +0 -0
  290. {Keras-2.2.2 → Keras-2.2.3}/tests/keras/utils/__pycache__/np_utils_test.cpython-27-PYTEST.pyc +0 -0
  291. {Keras-2.2.2 → Keras-2.2.3}/tests/keras/utils/__pycache__/vis_utils_test.cpython-27-PYTEST.pyc +0 -0
  292. {Keras-2.2.2 → Keras-2.2.3}/tests/keras/utils/conv_utils_test.py +0 -0
  293. {Keras-2.2.2 → Keras-2.2.3}/tests/keras/utils/np_utils_test.py +0 -0
  294. {Keras-2.2.2 → Keras-2.2.3}/tests/keras/wrappers/__pycache__/scikit_learn_test.cpython-27-PYTEST.pyc +0 -0
  295. {Keras-2.2.2 → Keras-2.2.3}/tests/test_doc_auto_generation.py +0 -0
@@ -1,12 +1,12 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: Keras
3
- Version: 2.2.2
3
+ Version: 2.2.3
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.2
9
+ Download-URL: https://github.com/keras-team/keras/tarball/2.2.3
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
@@ -100,6 +100,7 @@ keras/applications/imagenet_utils.py
100
100
  keras/applications/inception_resnet_v2.py
101
101
  keras/applications/inception_v3.py
102
102
  keras/applications/mobilenet.py
103
+ keras/applications/mobilenet_v2.py
103
104
  keras/applications/mobilenetv2.py
104
105
  keras/applications/nasnet.py
105
106
  keras/applications/resnet50.py
@@ -164,11 +165,13 @@ keras/utils/test_utils.py
164
165
  keras/utils/vis_utils.py
165
166
  keras/wrappers/__init__.py
166
167
  keras/wrappers/scikit_learn.py
168
+ tests/conftest.py
167
169
  tests/test_doc_auto_generation.py
168
170
  tests/test_documentation.py
169
171
  tests/test_dynamic_trainability.py
170
172
  tests/test_loss_masking.py
171
173
  tests/test_loss_weighting.py
174
+ tests/test_model_pickling.py
172
175
  tests/test_model_saving.py
173
176
  tests/test_multiprocessing.py
174
177
  tests/__pycache__/test_doc_auto_generation.cpython-27-PYTEST.pyc
@@ -183,6 +186,7 @@ tests/integration_tests/imagenet_utils_test.py
183
186
  tests/integration_tests/test_datasets.py
184
187
  tests/integration_tests/test_image_data_tasks.py
185
188
  tests/integration_tests/test_temporal_data_tasks.py
189
+ tests/integration_tests/test_tensorflow_integration.py
186
190
  tests/integration_tests/test_vector_data_tasks.py
187
191
  tests/integration_tests/__pycache__/applications_test.cpython-27-PYTEST.pyc
188
192
  tests/integration_tests/__pycache__/imagenet_utils_test.cpython-27-PYTEST.pyc
@@ -190,6 +194,9 @@ tests/integration_tests/__pycache__/test_datasets.cpython-27-PYTEST.pyc
190
194
  tests/integration_tests/__pycache__/test_image_data_tasks.cpython-27-PYTEST.pyc
191
195
  tests/integration_tests/__pycache__/test_temporal_data_tasks.cpython-27-PYTEST.pyc
192
196
  tests/integration_tests/__pycache__/test_vector_data_tasks.cpython-27-PYTEST.pyc
197
+ tests/integration_tests/preprocessing/image_test.py
198
+ tests/integration_tests/preprocessing/sequence_test.py
199
+ tests/integration_tests/preprocessing/text_test.py
193
200
  tests/keras/activations_test.py
194
201
  tests/keras/constraints_test.py
195
202
  tests/keras/initializers_test.py
@@ -226,6 +233,7 @@ tests/keras/layers/local_test.py
226
233
  tests/keras/layers/merge_test.py
227
234
  tests/keras/layers/noise_test.py
228
235
  tests/keras/layers/normalization_test.py
236
+ tests/keras/layers/pooling_test.py
229
237
  tests/keras/layers/recurrent_test.py
230
238
  tests/keras/layers/wrappers_test.py
231
239
  tests/keras/layers/__pycache__/advanced_activations_test.cpython-27-PYTEST.pyc
@@ -244,9 +252,6 @@ tests/keras/legacy/interface_test.py
244
252
  tests/keras/legacy/layers_test.py
245
253
  tests/keras/legacy/__pycache__/interface_test.cpython-27-PYTEST.pyc
246
254
  tests/keras/legacy/__pycache__/layers_test.cpython-27-PYTEST.pyc
247
- tests/keras/preprocessing/image_test.py
248
- tests/keras/preprocessing/sequence_test.py
249
- tests/keras/preprocessing/text_test.py
250
255
  tests/keras/preprocessing/__pycache__/image_test.cpython-27-PYTEST.pyc
251
256
  tests/keras/preprocessing/__pycache__/sequence_test.cpython-27-PYTEST.pyc
252
257
  tests/keras/preprocessing/__pycache__/text_test.cpython-27-PYTEST.pyc
@@ -3,14 +3,15 @@ scipy>=0.14
3
3
  six>=1.9.0
4
4
  pyyaml
5
5
  h5py
6
- keras_applications==1.0.4
7
- keras_preprocessing==1.0.2
6
+ keras_applications>=1.0.6
7
+ keras_preprocessing>=1.0.5
8
8
 
9
9
  [tests]
10
10
  pytest
11
11
  pytest-pep8
12
12
  pytest-xdist
13
13
  pytest-cov
14
+ pytest-timeout
14
15
  pandas
15
16
  requests
16
17
 
@@ -1,12 +1,12 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: Keras
3
- Version: 2.2.2
3
+ Version: 2.2.3
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.2
9
+ Download-URL: https://github.com/keras-team/keras/tarball/2.2.3
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
@@ -91,6 +91,7 @@ if sys.version[0] == '2':
91
91
 
92
92
  EXCLUDE = {
93
93
  'Optimizer',
94
+ 'TFOptimizer',
94
95
  'Wrapper',
95
96
  'get_session',
96
97
  'set_session',
@@ -172,17 +172,19 @@ model = InceptionV3(input_tensor=input_tensor, weights='imagenet', include_top=T
172
172
 
173
173
  | Model | Size | Top-1 Accuracy | Top-5 Accuracy | Parameters | Depth |
174
174
  | ----- | ----: | --------------: | --------------: | ----------: | -----: |
175
- | [Xception](#xception) | 88 MB | 0.790 | 0.945| 22,910,480 | 126 |
176
- | [VGG16](#vgg16) | 528 MB| 0.715 | 0.901 | 138,357,544 | 23
177
- | [VGG19](#vgg19) | 549 MB | 0.727 | 0.910 | 143,667,240 | 26
178
- | [ResNet50](#resnet50) | 99 MB | 0.759 | 0.929 | 25,636,712 | 168
179
- | [InceptionV3](#inceptionv3) | 92 MB | 0.788 | 0.944 | 23,851,784 | 159 |
180
- | [InceptionResNetV2](#inceptionresnetv2) | 215 MB | 0.804 | 0.953 | 55,873,736 | 572 |
181
- | [MobileNet](#mobilenet) | 17 MB | 0.665 | 0.871 | 4,253,864 | 88
182
- | [DenseNet121](#densenet) | 33 MB | 0.745 | 0.918 | 8,062,504 | 121
183
- | [DenseNet169](#densenet) | 57 MB | 0.759 | 0.928 | 14,307,880 | 169
184
- | [DenseNet201](#densenet) | 80 MB | 0.770 | 0.933 | 20,242,984 | 201
185
-
175
+ | [Xception](#xception) | 88 MB | 0.790 | 0.945 | 22,910,480 | 126 |
176
+ | [VGG16](#vgg16) | 528 MB | 0.713 | 0.901 | 138,357,544 | 23 |
177
+ | [VGG19](#vgg19) | 549 MB | 0.713 | 0.900 | 143,667,240 | 26 |
178
+ | [ResNet50](#resnet50) | 99 MB | 0.749 | 0.921 | 25,636,712 | 168 |
179
+ | [InceptionV3](#inceptionv3) | 92 MB | 0.779 | 0.937 | 23,851,784 | 159 |
180
+ | [InceptionResNetV2](#inceptionresnetv2) | 215 MB | 0.803 | 0.953 | 55,873,736 | 572 |
181
+ | [MobileNet](#mobilenet) | 16 MB | 0.704 | 0.895 | 4,253,864 | 88 |
182
+ | [MobileNetV2](#mobilenetv2) | 14 MB | 0.713 | 0.901 | 3,538,984 | 88 |
183
+ | [DenseNet121](#densenet) | 33 MB | 0.750 | 0.923 | 8,062,504 | 121 |
184
+ | [DenseNet169](#densenet) | 57 MB | 0.762 | 0.932 | 14,307,880 | 169 |
185
+ | [DenseNet201](#densenet) | 80 MB | 0.773 | 0.936 | 20,242,984 | 201 |
186
+ | [NASNetMobile](#nasnet) | 23 MB | 0.744 | 0.919 | 5,326,716 | - |
187
+ | [NASNetLarge](#nasnet) | 343 MB | 0.825 | 0.960 | 88,949,818 | - |
186
188
 
187
189
  The top-1 and top-5 accuracy refers to the model's performance on the ImageNet validation dataset.
188
190
 
@@ -269,7 +271,7 @@ The default input size for this model is 224x224.
269
271
  has to be `(224, 224, 3)` (with `'channels_last'` data format)
270
272
  or `(3, 224, 224)` (with `'channels_first'` data format).
271
273
  It should have exactly 3 inputs channels,
272
- and width and height should be no smaller than 48.
274
+ and width and height should be no smaller than 32.
273
275
  E.g. `(200, 200, 3)` would be one valid value.
274
276
  - pooling: Optional pooling mode for feature extraction
275
277
  when `include_top` is `False`.
@@ -324,7 +326,7 @@ The default input size for this model is 224x224.
324
326
  has to be `(224, 224, 3)` (with `'channels_last'` data format)
325
327
  or `(3, 224, 224)` (with `'channels_first'` data format).
326
328
  It should have exactly 3 inputs channels,
327
- and width and height should be no smaller than 48.
329
+ and width and height should be no smaller than 32.
328
330
  E.g. `(200, 200, 3)` would be one valid value.
329
331
  - pooling: Optional pooling mode for feature extraction
330
332
  when `include_top` is `False`.
@@ -381,7 +383,7 @@ The default input size for this model is 224x224.
381
383
  has to be `(224, 224, 3)` (with `'channels_last'` data format)
382
384
  or `(3, 224, 224)` (with `'channels_first'` data format).
383
385
  It should have exactly 3 inputs channels,
384
- and width and height should be no smaller than 197.
386
+ and width and height should be no smaller than 32.
385
387
  E.g. `(200, 200, 3)` would be one valid value.
386
388
  - pooling: Optional pooling mode for feature extraction
387
389
  when `include_top` is `False`.
@@ -436,7 +438,7 @@ The default input size for this model is 299x299.
436
438
  has to be `(299, 299, 3)` (with `'channels_last'` data format)
437
439
  or `(3, 299, 299)` (with `'channels_first'` data format).
438
440
  It should have exactly 3 inputs channels,
439
- and width and height should be no smaller than 139.
441
+ and width and height should be no smaller than 75.
440
442
  E.g. `(150, 150, 3)` would be one valid value.
441
443
  - pooling: Optional pooling mode for feature extraction
442
444
  when `include_top` is `False`.
@@ -491,7 +493,7 @@ The default input size for this model is 299x299.
491
493
  has to be `(299, 299, 3)` (with `'channels_last'` data format)
492
494
  or `(3, 299, 299)` (with `'channels_first'` data format).
493
495
  It should have exactly 3 inputs channels,
494
- and width and height should be no smaller than 139.
496
+ and width and height should be no smaller than 75.
495
497
  E.g. `(150, 150, 3)` would be one valid value.
496
498
  - pooling: Optional pooling mode for feature extraction
497
499
  when `include_top` is `False`.
@@ -618,9 +620,11 @@ The default input size for this model is 224x224.
618
620
  to use as image input for the model.
619
621
  - input_shape: optional shape tuple, only to be specified
620
622
  if `include_top` is False (otherwise the input shape
621
- has to be `(224, 224, 3)` (with `channels_last` data format)
622
- or `(3, 224, 224)` (with `channels_first` data format).
623
- It should have exactly 3 inputs channels.
623
+ has to be `(224, 224, 3)` (with `'channels_last'` data format)
624
+ or `(3, 224, 224)` (with `'channels_first'` data format).
625
+ It should have exactly 3 inputs channels,
626
+ and width and height should be no smaller than 32.
627
+ E.g. `(200, 200, 3)` would be one valid value.
624
628
  - pooling: optional pooling mode for feature extraction
625
629
  when `include_top` is `False`.
626
630
  - `None` means that the output of the model will be
@@ -14,7 +14,7 @@ from keras.datasets import cifar10
14
14
 
15
15
  - __Returns:__
16
16
  - 2 tuples:
17
- - __x_train, x_test__: uint8 array of RGB image data with shape (num_samples, 3, 32, 32).
17
+ - __x_train, x_test__: uint8 array of RGB image data with shape (num_samples, 3, 32, 32) or (num_samples, 32, 32, 3) based on the `image_data_format` backend setting of either `channels_first` or `channels_last` respectively.
18
18
  - __y_train, y_test__: uint8 array of category labels (integers in range 0-9) with shape (num_samples,).
19
19
 
20
20
 
@@ -34,7 +34,7 @@ from keras.datasets import cifar100
34
34
 
35
35
  - __Returns:__
36
36
  - 2 tuples:
37
- - __x_train, x_test__: uint8 array of RGB image data with shape (num_samples, 3, 32, 32).
37
+ - __x_train, x_test__: uint8 array of RGB image data with shape (num_samples, 3, 32, 32) or (num_samples, 32, 32, 3) based on the `image_data_format` backend setting of either `channels_first` or `channels_last` respectively.
38
38
  - __y_train, y_test__: uint8 array of category labels with shape (num_samples,).
39
39
 
40
40
  - __Arguments:__
@@ -206,4 +206,4 @@ from keras.datasets import boston_housing
206
206
  - __test_split__: fraction of the data to reserve as test set.
207
207
 
208
208
  - __Returns:__
209
- Tuple of Numpy arrays: `(x_train, y_train), (x_test, y_test)`.
209
+ Tuple of Numpy arrays: `(x_train, y_train), (x_test, y_test)`.
@@ -19,7 +19,7 @@
19
19
  - [How can I use HDF5 inputs with Keras?](#how-can-i-use-hdf5-inputs-with-keras)
20
20
  - [Where is the Keras configuration file stored?](#where-is-the-keras-configuration-file-stored)
21
21
  - [How can I obtain reproducible results using Keras during development?](#how-can-i-obtain-reproducible-results-using-keras-during-development)
22
- - [How can I install HDF5 or h5py to save my models in Keras?](#how-can-i-install-HDF5-or-h5py-to-save-my-models-in-Keras)
22
+ - [How can I install HDF5 or h5py to save my models in Keras?](#how-can-i-install-hdf5-or-h5py-to-save-my-models-in-keras)
23
23
 
24
24
  ---
25
25
 
@@ -149,7 +149,7 @@ You can then use `keras.models.load_model(filepath)` to reinstantiate your model
149
149
  `load_model` will also take care of compiling the model using the saved training configuration
150
150
  (unless the model was never compiled in the first place).
151
151
 
152
- Please also see [How can I install HDF5 or h5py to save my models in Keras?](#how-can-i-install-HDF5-or-h5py-to-save-my-models-in-Keras) for instructions on how to install `h5py`.
152
+ Please also see [How can I install HDF5 or h5py to save my models in Keras?](#how-can-i-install-hdf5-or-h5py-to-save-my-models-in-keras) for instructions on how to install `h5py`.
153
153
 
154
154
  Example:
155
155
 
@@ -210,7 +210,7 @@ If you need to load weights into a *different* architecture (with some layers in
210
210
  model.load_weights('my_model_weights.h5', by_name=True)
211
211
  ```
212
212
 
213
- Please also see [How can I install HDF5 or h5py to save my models in Keras?](#how-can-i-install-HDF5-or-h5py-to-save-my-models-in-Keras) for instructions on how to install `h5py`.
213
+ Please also see [How can I install HDF5 or h5py to save my models in Keras?](#how-can-i-install-hdf5-or-h5py-to-save-my-models-in-keras) for instructions on how to install `h5py`.
214
214
 
215
215
  For example:
216
216
 
@@ -517,7 +517,7 @@ with h5py.File('input/file.hdf5', 'r') as f:
517
517
  model.predict(x_data)
518
518
  ```
519
519
 
520
- Please also see [How can I install HDF5 or h5py to save my models in Keras?](#how-can-i-install-HDF5-or-h5py-to-save-my-models-in-Keras) for instructions on how to install `h5py`.
520
+ Please also see [How can I install HDF5 or h5py to save my models in Keras?](#how-can-i-install-hdf5-or-h5py-to-save-my-models-in-keras) for instructions on how to install `h5py`.
521
521
 
522
522
  ---
523
523
 
@@ -556,22 +556,36 @@ Likewise, cached dataset files, such as those downloaded with [`get_file()`](/ut
556
556
 
557
557
  ### How can I obtain reproducible results using Keras during development?
558
558
 
559
- During development of a model, sometimes it is useful to be able to obtain reproducible results from run to run in order to determine if a change in performance is due to an actual model or data modification, or merely a result of a new random sample. The below snippet of code provides an example of how to obtain reproducible results - this is geared towards a TensorFlow backend for a Python 3 environment.
559
+ During development of a model, sometimes it is useful to be able to obtain reproducible results from run to run in order to determine if a change in performance is due to an actual model or data modification, or merely a result of a new random sample.
560
+
561
+ First, you need to set the `PYTHONHASHSEED` environment variable to `0` before the program starts (not within the program itself). This is necessary in Python 3.2.3 onwards to have reproducible behavior for certain hash-based operations (e.g., the item order in a set or a dict, see [Python's documentation](https://docs.python.org/3.7/using/cmdline.html#envvar-PYTHONHASHSEED) or [issue #2280](https://github.com/keras-team/keras/issues/2280#issuecomment-306959926) for further details). One way to set the environment variable is when starting python like this:
562
+
563
+ ```
564
+ $ cat test_hash.py
565
+ print(hash("keras"))
566
+ $ python3 test_hash.py # non-reproducible hash (Python 3.2.3+)
567
+ -8127205062320133199
568
+ $ python3 test_hash.py # non-reproducible hash (Python 3.2.3+)
569
+ 3204480642156461591
570
+ $ PYTHONHASHSEED=0 python3 test_hash.py # reproducible hash
571
+ 4883664951434749476
572
+ $ PYTHONHASHSEED=0 python3 test_hash.py # reproducible hash
573
+ 4883664951434749476
574
+ ```
575
+
576
+ Moreover, when using the TensorFlow backend and running on a GPU, some operations have non-deterministic outputs, in particular `tf.reduce_sum()`. This is due to the fact that GPUs run many operations in parallel, so the order of execution is not always guaranteed. Due to the limited precision of floats, even adding several numbers together may give slightly different results depending on the order in which you add them. You can try to avoid the non-deterministic operations, but some may be created automatically by TensorFlow to compute the gradients, so it is much simpler to just run the code on the CPU. For this, you can set the `CUDA_VISIBLE_DEVICES` environment variable to an empty string, for example:
577
+
578
+ ```
579
+ $ CUDA_VISIBLE_DEVICES="" PYTHONHASHSEED=0 python your_program.py
580
+ ```
581
+
582
+ The below snippet of code provides an example of how to obtain reproducible results - this is geared towards a TensorFlow backend for a Python 3 environment:
560
583
 
561
584
  ```python
562
585
  import numpy as np
563
586
  import tensorflow as tf
564
587
  import random as rn
565
588
 
566
- # The below is necessary in Python 3.2.3 onwards to
567
- # have reproducible behavior for certain hash-based operations.
568
- # See these references for further details:
569
- # https://docs.python.org/3.4/using/cmdline.html#envvar-PYTHONHASHSEED
570
- # https://github.com/keras-team/keras/issues/2280#issuecomment-306959926
571
-
572
- import os
573
- os.environ['PYTHONHASHSEED'] = '0'
574
-
575
589
  # The below is necessary for starting Numpy generated random numbers
576
590
  # in a well-defined initial state.
577
591
 
@@ -583,17 +597,18 @@ np.random.seed(42)
583
597
  rn.seed(12345)
584
598
 
585
599
  # Force TensorFlow to use single thread.
586
- # Multiple threads are a potential source of
587
- # non-reproducible results.
588
- # For further details, see: https://stackoverflow.com/questions/42022950/which-seeds-have-to-be-set-where-to-realize-100-reproducibility-of-training-res
600
+ # Multiple threads are a potential source of non-reproducible results.
601
+ # For further details, see: https://stackoverflow.com/questions/42022950/
589
602
 
590
- session_conf = tf.ConfigProto(intra_op_parallelism_threads=1, inter_op_parallelism_threads=1)
603
+ session_conf = tf.ConfigProto(intra_op_parallelism_threads=1,
604
+ inter_op_parallelism_threads=1)
591
605
 
592
606
  from keras import backend as K
593
607
 
594
608
  # The below tf.set_random_seed() will make random number generation
595
609
  # in the TensorFlow backend have a well-defined initial state.
596
- # For further details, see: https://www.tensorflow.org/api_docs/python/tf/set_random_seed
610
+ # For further details, see:
611
+ # https://www.tensorflow.org/api_docs/python/tf/set_random_seed
597
612
 
598
613
  tf.set_random_seed(1234)
599
614
 
@@ -11,7 +11,6 @@ Here is the skeleton of a Keras layer, **as of Keras 2.0** (if you have an older
11
11
  ```python
12
12
  from keras import backend as K
13
13
  from keras.engine.topology import Layer
14
- import numpy as np
15
14
 
16
15
  class MyLayer(Layer):
17
16
 
@@ -34,4 +33,36 @@ class MyLayer(Layer):
34
33
  return (input_shape[0], self.output_dim)
35
34
  ```
36
35
 
36
+ It is also possible to define Keras layers which have multiple input tensors and multiple ouput tensors. To do this, you should assume that the inputs and outputs of the methods `build(input_shape)`, `call(x)` and `compute_output_shape(input_shape)` are lists. Here is an example, similar to the one above:
37
+
38
+ ```python
39
+ from keras import backend as K
40
+ from keras.engine.topology import Layer
41
+
42
+ class MyLayer(Layer):
43
+
44
+ def __init__(self, output_dim, **kwargs):
45
+ self.output_dim = output_dim
46
+ super(MyLayer, self).__init__(**kwargs)
47
+
48
+ def build(self, input_shape):
49
+ assert isinstance(input_shape, list)
50
+ # Create a trainable weight variable for this layer.
51
+ self.kernel = self.add_weight(name='kernel',
52
+ shape=(input_shape[0][1], self.output_dim),
53
+ initializer='uniform',
54
+ trainable=True)
55
+ super(MyLayer, self).build(input_shape) # Be sure to call this at the end
56
+
57
+ def call(self, x):
58
+ assert isinstance(x, list)
59
+ a, b = x
60
+ return [K.dot(a, self.kernel) + b, K.mean(b, axis=-1)]
61
+
62
+ def compute_output_shape(self, input_shape):
63
+ assert isinstance(input_shape, list)
64
+ shape_a, shape_b = input_shape
65
+ return [(shape_a[0], self.output_dim), shape_b[:-1]]
66
+ ```
67
+
37
68
  The existing Keras layers provide examples of how to implement almost anything. Never hesitate to read the source code!
@@ -0,0 +1,53 @@
1
+
2
+ ## Model visualization
3
+
4
+ The `keras.utils.vis_utils` module provides utility functions to plot
5
+ a Keras model (using `graphviz`).
6
+
7
+ This will plot a graph of the model and save it to a file:
8
+ ```python
9
+ from keras.utils import plot_model
10
+ plot_model(model, to_file='model.png')
11
+ ```
12
+
13
+ `plot_model` takes two optional arguments:
14
+
15
+ - `show_shapes` (defaults to False) controls whether output shapes are shown in the graph.
16
+ - `show_layer_names` (defaults to True) controls whether layer names are shown in the graph.
17
+
18
+ You can also directly obtain the `pydot.Graph` object and render it yourself,
19
+ for example to show it in an ipython notebook :
20
+ ```python
21
+ from IPython.display import SVG
22
+ from keras.utils.vis_utils import model_to_dot
23
+
24
+ SVG(model_to_dot(model).create(prog='dot', format='svg'))
25
+ ```
26
+
27
+ ## Training history visualization
28
+
29
+ The `fit()` method on a Keras `Model` returns a `History` object. The `History.history` attribute is a dictionary recording training loss values and metrics values at successive epochs, as well as validation loss values and validation metrics values (if applicable). Here is a simple example using `matplotlib` to generate loss & accuracy plots for training & validation:
30
+
31
+ ```python
32
+ import matplotlib.pyplot as plt
33
+
34
+ history = model.fit(x, y, validation_split=0.25, epochs=50, batch_size=16, verbose=1)
35
+
36
+ # Plot training & validation accuracy values
37
+ plt.plot(history.history['acc'])
38
+ plt.plot(history.history['val_acc'])
39
+ plt.title('Model accuracy')
40
+ plt.ylabel('Accuracy')
41
+ plt.xlabel('Epoch')
42
+ plt.legend(['Train', 'Test'], loc='upper left')
43
+ plt.show()
44
+
45
+ # Plot training & validation loss values
46
+ plt.plot(history.history['loss'])
47
+ plt.plot(history.history['val_loss'])
48
+ plt.title('Model loss')
49
+ plt.ylabel('Loss')
50
+ plt.xlabel('Epoch')
51
+ plt.legend(['Train', 'Test'], loc='upper left')
52
+ plt.show()
53
+ ```
@@ -14,15 +14,18 @@ There are countless deep learning frameworks available today. Why use Keras rath
14
14
 
15
15
  ## Keras has broad adoption in the industry and the research community
16
16
 
17
- With over 200,000 individual users as of November 2017, Keras has stronger adoption in both the industry and the research community than any other deep learning framework except TensorFlow itself (and Keras is commonly used in conjunction with TensorFlow).
17
+ <a href='https://towardsdatascience.com/deep-learning-framework-power-scores-2018-23607ddf297a'>
18
+ <img style='width: 80%; margin-left: 10%;' src='https://s3.amazonaws.com/keras.io/img/dl_frameworks_power_scores.png'/>
19
+ </a>
20
+ <p style='font-style: italic; font-size: 10pt; text-align: center;'>
21
+ Deep learning frameworks ranking computed by Jeff Hale, based on 11 data sources across 7 categories
22
+ </i>
18
23
 
19
- You are already constantly interacting with features built with Keras -- it is in use at Netflix, Uber, Yelp, Instacart, Zocdoc, Square, and many others. It is especially popular among startups that place deep learning at the core of their products.
20
-
21
- Keras is also a favorite among deep learning researchers, coming in #2 in terms of mentions in scientific papers uploaded to the preprint server [arXiv.org](https://arxiv.org/archive/cs):
24
+ With over 250,000 individual users as of mid-2018, Keras has stronger adoption in both the industry and the research community than any other deep learning framework except TensorFlow itself (and the Keras API is the official frontend of TensorFlow, via the `tf.keras` module).
22
25
 
23
- <img src='/img/arxiv-mentions.png' style='width:500px; display: block; margin: 0 auto;'/>
26
+ You are already constantly interacting with features built with Keras -- it is in use at Netflix, Uber, Yelp, Instacart, Zocdoc, Square, and many others. It is especially popular among startups that place deep learning at the core of their products.
24
27
 
25
- Keras has also been adopted by researchers at large scientific organizations, in particular CERN and NASA.
28
+ Keras is also a favorite among deep learning researchers, coming in #2 in terms of mentions in scientific papers uploaded to the preprint server [arXiv.org](https://arxiv.org/archive/cs). Keras has also been adopted by researchers at large scientific organizations, in particular CERN and NASA.
26
29
 
27
30
  ---
28
31
 
@@ -6,10 +6,10 @@ and 79% after 15 epochs, and overfitting after 20 epochs
6
6
 
7
7
  With Data Augmentation:
8
8
  It gets to 75% validation accuracy in 10 epochs,
9
- and 79% after 15 epochs, and 83% after 30 epcohs.
10
- In my test, highest validation accuracy is 83.79% after 50 epcohs.
9
+ and 79% after 15 epochs, and 83% after 30 epochs.
10
+ In my test, highest validation accuracy is 83.79% after 50 epochs.
11
11
 
12
- This is a fast Implement, just 20s/epcoh with a gtx 1070 gpu.
12
+ This is a fast Implement, just 20s/epoch with a gtx 1070 gpu.
13
13
  """
14
14
 
15
15
  from __future__ import print_function
@@ -129,8 +129,11 @@ stitched_filters = np.zeros((width, height, 3))
129
129
  for i in range(n):
130
130
  for j in range(n):
131
131
  img, loss = kept_filters[i * n + j]
132
- stitched_filters[(img_width + margin) * i: (img_width + margin) * i + img_width,
133
- (img_height + margin) * j: (img_height + margin) * j + img_height, :] = img
132
+ width_margin = (img_width + margin) * i
133
+ height_margin = (img_height + margin) * j
134
+ stitched_filters[
135
+ width_margin: width_margin + img_width,
136
+ height_margin: height_margin + img_height, :] = img
134
137
 
135
138
  # save the result to disk
136
139
  save_img('stitched_filters_%dx%d.png' % (n, n), stitched_filters)
@@ -83,7 +83,8 @@ layer_dict = dict([(layer.name, layer) for layer in model.layers])
83
83
  loss = K.variable(0.)
84
84
  for layer_name in settings['features']:
85
85
  # Add the L2 norm of the features of a layer to the loss.
86
- assert layer_name in layer_dict.keys(), 'Layer ' + layer_name + ' not found in model.'
86
+ assert (layer_name in layer_dict.keys(),
87
+ 'Layer ' + layer_name + ' not found in model.')
87
88
  coeff = settings['features'][layer_name]
88
89
  x = layer_dict[layer_name].output
89
90
  # We avoid border artifacts by only involving non-border pixels in the loss.