deepforge-dev / deepforge-keras

A deepforge extension providing support for neural networks using keras
Apache License 2.0
8 stars 3 forks source link

Use Python to parse tensorflow v2 keras schemas (Closes #149) #180

Closed umesh-timalsina closed 4 years ago

umesh-timalsina commented 4 years ago

Checklist:

brollb commented 4 years ago

The tests for the schemas should actually still work as long as the schema format doesn't change. (It shouldn't need to.)

umesh-timalsina commented 4 years ago

@brollb I am requesting your review in this PR. I will commit the JSON files once other issues are resolved in this PR.

umesh-timalsina commented 4 years ago

With every test passing with increased timeouts, I think this PR is ready to be reviewed/merged. Would any changes to deepforge be necessary @brollb ?

brollb commented 4 years ago

When I try to update the keras project seed, I see the following error: DeepinScreenshot_select-area_20200819124939

brollb commented 4 years ago

After looking at it a bit more, it looks like this could be an issue with the JSONImporter as an attribute was updated to no longer be an enum. However, I am not sure if this attribute should be changed. Is scale for BatchNorm still a boolean?

umesh-timalsina commented 4 years ago

CreateKerasMeta passes when starting with base seed. However it fails during update of the keras seed.

brollb commented 4 years ago

I have a couple fixes that should help with some of those errors (#189 #187)

brollb commented 4 years ago

I almost forgot that we will need to update initCode.py: https://www.tensorflow.org/guide/keras/save_and_serialize

umesh-timalsina commented 4 years ago

I almost forgot that we will need to update initCode.py: https://www.tensorflow.org/guide/keras/save_and_serialize

Do we want to save the model in pb format now?

umesh-timalsina commented 4 years ago

It appears that TimeDistrubuted layer doesn't add a pointer to a layer for its layer attribute. However, BiDirectional correctly points to the layer using this branch.

image

umesh-timalsina commented 4 years ago

Blocked by https://github.com/deepforge-dev/deepforge/issues/1894

umesh-timalsina commented 4 years ago

While converting the test project seed to use this branch for Sequence 2 Sequence Model (specifically when combining 2 states to one between 2 LSTMS as shown in the figure below:

image

I got the following error:

Connection.js:76 Uncaught (in promise) TypeError: dims.map is not a function
    at Connection.setDimensionality (Connection.js:76)
    at KerasArchEditorWidget.js:402
    at Array.forEach (<anonymous>)
    at KerasArchEditorWidget.showAnalysisResults (KerasArchEditorWidget.js:395)
    at KerasArchEditorControl.getLatestAnalysis (KerasArchEditorControl.js:963)
brollb commented 4 years ago

Can you share the JSON representation of dimensionality/error info?

umesh-timalsina commented 4 years ago

image The variable dims seems to be a single integer in this case.