Skip to content

Commit

Permalink
Improve docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
fchollet committed Oct 11, 2017
1 parent 1a3d9de commit d3db58c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
18 changes: 13 additions & 5 deletions docs/autogen.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,6 @@
import inspect
import os
import shutil
import sys
if sys.version[0] == '2':
reload(sys)
sys.setdefaultencoding('utf8')

from keras import utils
from keras import layers
Expand All @@ -85,6 +81,11 @@
from keras import backend
from keras import activations

import sys
if sys.version[0] == '2':
reload(sys)
sys.setdefaultencoding('utf8')


EXCLUDE = {
'Optimizer',
Expand Down Expand Up @@ -347,10 +348,17 @@ def get_class_signature(cls):
try:
class_signature = get_function_signature(cls.__init__)
class_signature = class_signature.replace('__init__', cls.__name__)
except:
except TypeError:
# in case the class inherits from object and does not
# define __init__
class_signature = cls.__module__ + '.' + cls.__name__ + '()'

parts = class_signature.split('.')
if len(parts) >= 4:
if parts[1] == 'layers':
class_signature = 'keras.layers.' + '.'.join(parts[3:])
if parts[1] == 'utils':
class_signature = 'keras.utils.' + '.'.join(parts[3:])
return class_signature


Expand Down
4 changes: 2 additions & 2 deletions keras/layers/cudnn_recurrent.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def get_losses_for(self, inputs=None):


class CuDNNGRU(_CuDNNRNN):
"""Fast GRU implementation backed by CuDNN.
"""Fast GRU implementation backed by [CuDNN](https://developer.nvidia.com/cudnn).
Can only be run on GPU, with the TensorFlow backend.
Expand Down Expand Up @@ -307,7 +307,7 @@ def get_config(self):


class CuDNNLSTM(_CuDNNRNN):
"""Fast LSTM implementation backed by CuDNN.
"""Fast LSTM implementation backed by [CuDNN](https://developer.nvidia.com/cudnn).
Can only be run on GPU, with the TensorFlow backend.
Expand Down

0 comments on commit d3db58c

Please sign in to comment.