Giter Club home page Giter Club logo

Comments (9)

marcj avatar marcj commented on July 4, 2024 1

Btw, since you already manually called watch_keras_model, you don't have to pass it again to create_keras_callback, so keep this line like that:

deepkit_callback = experiment.create_keras_callback()

from deepkit-ml.

martinlie avatar martinlie commented on July 4, 2024 1

This is nice - the fix works! And the GUI is beautiful! Keras version 2.4.3. Btw, how is the Python package release schedule? I would like to run containerised, so the library will be downloaded on each build. The fix would be nice to get pushed to the registry.

from deepkit-ml.

martinlie avatar martinlie commented on July 4, 2024

I suspect the network is the problem, but I think it should be supported:

n_input = 12
n_features = 1
generator = TimeseriesGenerator(train, train, length=n_input, batch_size=6)

model = Sequential()
model.add(LSTM(200, activation='relu', input_shape=(n_input, n_features)))
model.add(Dropout(0.15))
model.add(Dense(1))
model.compile(optimizer='adam', loss='mse')

experiment.watch_keras_model(model)
deepkit_callback = experiment.create_keras_callback(model)

model.fit(generator,epochs=90, callbacks=[deepkit_callback])

from deepkit-ml.

marcj avatar marcj commented on July 4, 2024

Mh, yes seems so. It can not automatically infer the input for the debugger. You can try to work around that by providing manually the model input.

experiment.watch_keras_model(model, model_input=x, is_batch=True)

is_batch needs to be True or False, depending on your network structure. model_input is the input (batched or a simple entry) of your network input aka x.

from deepkit-ml.

marcj avatar marcj commented on July 4, 2024

Since you have a generator, you could try

experiment.watch_keras_model(model, model_input=next(iter(generator)), is_batch=True)

from deepkit-ml.

martinlie avatar martinlie commented on July 4, 2024

This seems to be an improvement, but when I combine and do:

experiment.watch_keras_model(model, model_input=next(iter(generator)), is_batch=True)
deepkit_callback = experiment.create_keras_callback()
model.fit(generator,epochs=90,callbacks=[deepkit_callback])

the program throws the exception:

  File "/usr/local/lib/python3.8/site-packages/tensorflow/python/keras/callbacks.py", line 601, in on_train_batch_begin
    self.on_batch_begin(batch, logs=logs)
  File "/usr/local/lib/python3.8/site-packages/deepkit/deepkit_keras.py", line 117, in on_batch_begin
    batch_size = logs['size']
KeyError: 'size'
Ended task main # 0 exitCode 1

If I omit the callback, the script runs with the generator, however it would be nice to get real time updates and accuracy reports etc. Any tips?

from deepkit-ml.

marcj avatar marcj commented on July 4, 2024

Which Keras version do you use? It seems it does not report the size log entry in its on_batch_begin hook.

from deepkit-ml.

marcj avatar marcj commented on July 4, 2024

I pushed a change to master which should fix this issue. Please try it (by installing master on your computer or simply copy&paste its file content). When you provide me a reproduction code I can integrate in a unit test.

from deepkit-ml.

marcj avatar marcj commented on July 4, 2024

I just released 1.0.8 with the fix. Thanks!

from deepkit-ml.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.