Skip to content

How to contribute in development

César Souza edited this page Aug 10, 2017 · 8 revisions

Welcome to the keras-sharp wiki!

This is the first page in the wiki while the project is being developed. Hopefully it should instruct you how to contribute in the development of Keras Sharp.

The workflow for a contribution is the following. First, please open the following link:

As you can see, this is a link to the original Keras project. Now, please select a function of your liking, such as for example, zeros:

As you might be able to see, the function should look like this:

def zeros(shape, dtype=None, name=None):
    """Instantiates an all-zeros variable and returns it.
    # Arguments
        shape: Tuple of integers, shape of returned Keras variable
        dtype: String, data type of returned Keras variable
        name: String, name of returned Keras variable
    # Returns
        A variable (including Keras metadata), filled with `0.0`.
    # Example
    ```python
        >>> from keras import backend as K
        >>> kvar = K.zeros((3,4))
        >>> K.eval(kvar)
        array([[ 0.,  0.,  0.,  0.],
               [ 0.,  0.,  0.,  0.],
               [ 0.,  0.,  0.,  0.]], dtype=float32)
    ```
    """
    if dtype is None:
        dtype = floatx()
    shape = tuple(map(int, shape))
    tf_dtype = _convert_string_dtype(dtype)
    return variable(tf.constant_initializer(0., dtype=tf_dtype)(shape),
                    dtype, name)

Now, notice there is an example demonstrating how this function can be used from Python. Now, to contribute an implementation for this function in Keras Sharp, please open up the Keras Sharp project in Visual Studio:

Clone this wiki locally