Giter VIP home page Giter VIP logo

braai's Introduction

๐Ÿ”ญ

braai's People

Contributors

dependabot[bot] avatar dmitryduev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

braai's Issues

`lr` and decay are deprecated in Keras optimizer- braai_train.ipynb

lr and decay are deprecated in Keras optimizer, using learning_rate corrects the warning.

The corrected code for the cell I presume is :
model = vgg6(input_shape=image_shape, n_classes=n_classes)

Set up optimizer:

if optimizer == 'adam':
optimizer = tf.keras.optimizers.Adam(learning_rate=3e-4, beta_1=0.9, beta_2=0.999, epsilon=None, amsgrad=False)
elif optimizer == 'sgd':
optimizer = tf.keras.optimizers.SGD(learning_rate=0.01, momentum=0.9, decay=1e-6, nesterov=True)
else:
print('Could not recognize optimizer, using Adam')
optimizer = tf.keras.optimizers.Adam(learning_rate=3e-4, beta_1=0.9, beta_2=0.999, epsilon=None, amsgrad=False)

model.compile(optimizer=optimizer, loss=loss, metrics=['accuracy'])

print(model.summary())

Model.fit_generator` is deprecated in braai_train.ipynb

Model.fit_generator is obsolete. I have been trying tf.keras.Model() but that does not execute without errors. Model.fit does not work either when it comes to training models with generators

the following is the error message :
:4: UserWarning: Model.fit_generator is deprecated and will be removed in a future version. Please use Model.fit, which supports generators.
h = model.fit_generator(training_generator,
Epoch 1/100

ValueError Traceback (most recent call last)
in <cell line: 4>()
2 model_name = f'braai_{model.name}_{run_t_stamp}'
3
----> 4 h = model.fit_generator(training_generator,
5 steps_per_epoch=len(x_train) // batch_size,
6 validation_data=validation_generator,

2 frames
/usr/local/lib/python3.10/dist-packages/keras/src/engine/training.py in tf__train_function(iterator)
13 try:
14 do_return = True
---> 15 retval_ = ag__.converted_call(ag__.ld(step_function), (ag__.ld(self), ag__.ld(iterator)), None, fscope)
16 except:
17 do_return = False

ValueError: in user code:

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.