dmitryduev / braai Goto Github PK
View Code? Open in Web Editor NEWbraai [Bogus/Real Adversarial AI]: Real-bogus astrophysical event classification for the Zwicky Transient Facility (ZTF) using deep learning
License: MIT License
braai [Bogus/Real Adversarial AI]: Real-bogus astrophysical event classification for the Zwicky Transient Facility (ZTF) using deep learning
License: MIT License
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)
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 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
Model.fit_generator
is deprecated and will be removed in a future version. Please use Model.fit
, which supports generators.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:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.