Skip to content

Compatible for python3 and new keras #40

Description

@GeorgeKAHChen
No description provided.

Activity

  1. changed the title [-]W[/-] [+]Compatible for python3 and new keras[/+] on Sep 30, 2018
  2. GeorgeKAHChen commented on Sep 30, 2018

    @GeorgeKAHChen
    Author

    For some reason we found this program to change python, keras to cpp. However after we used, we found some problem for this program. On the one hand, there are some little problem on python2 to python3. On the other hand, some subject of the json file of new keras has been changed. And after test, finally, we build a new version on this site

    https://github.com/KazukiAmakawa/keras2cpp

  3. djsg commented on Dec 27, 2018

    @djsg

    @KazukiAmakawa
    Hi, I tried your package, and got one warning and one error:
    /data/fitpu/py_vt/tutorial-env/lib/python3.5/site-packages/keras/engine/base_layer.py:1109: UserWarning: Update your Dense call to the Keras 2 API: Dense(kernel_regularizer=None, trainable=True, units=10, kernel_initializer="glorot_uniform", activation="linear", activity_regularizer=None, bias_regularizer=None, bias_constraint=None, use_bias=True, input_dim=None, kernel_constraint=None, name="dense_2")
    return cls(**config)
    Traceback (most recent call last):
    File "dump_to_simple_cpp.py", line 48, in
    fout.write(str(W.shape[0]) + ' ' + str(W.shape[1]) + ' ' + str(W.shape[2]) + ' ' + str(W.shape[3]) + ' ' + l['config']['padding'] + '\n')
    KeyError: 'padding'

  4. gosha20777 commented on Jan 17, 2019

    @gosha20777

    @KazukiAmakawa
    Hi, I tried your package, and got one warning and one error:
    /data/fitpu/py_vt/tutorial-env/lib/python3.5/site-packages/keras/engine/base_layer.py:1109: UserWarning: Update your Dense call to the Keras 2 API: Dense(kernel_regularizer=None, trainable=True, units=10, kernel_initializer="glorot_uniform", activation="linear", activity_regularizer=None, bias_regularizer=None, bias_constraint=None, use_bias=True, input_dim=None, kernel_constraint=None, name="dense_2")
    return cls(**config)
    Traceback (most recent call last):
    File "dump_to_simple_cpp.py", line 48, in
    fout.write(str(W.shape[0]) + ' ' + str(W.shape[1]) + ' ' + str(W.shape[2]) + ' ' + str(W.shape[3]) + ' ' + l['config']['padding'] + '\n')
    KeyError: 'padding'

    This implementation does not work with python3. See issue #41

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions