1

I get this error

" AttributeError: 'list' object has no attribute 'set_model' "

when I add learning schedule callback callbacks_list in model.fit_generator

<callbacks=[callback,callbacks_list]> 

How can i solve this error??

lrate = LearningRateScheduler(step_decay)
callbacks_list = [lrate]
history=model.fit_generator(generate_arrays_for_training(indexPat, filesPath, end=75), #end=75),
                                validation_data=generate_arrays_for_training(indexPat, filesPath, start=75),#start=75),
                                steps_per_epoch=int((len(filesPath)-int(len(filesPath)/100*25))),#*25), 
                                validation_steps=int((len(filesPath)-int(len(filesPath)/100*75))),#*75),
                                verbose=2,
                                epochs=300, max_queue_size=2, shuffle=True, callbacks=[callback,callbacks_list])


mag_zbc
  • 6,801
  • 14
  • 40
  • 62
Eda
  • 565
  • 1
  • 7
  • 18

1 Answers1

0

You are putting one of your callbacks in an unnecessary list, which produces the error. Just do this:

callbacks=[callback, lrate]
Dr. Snoopy
  • 55,122
  • 7
  • 121
  • 140