rykov8 / ssd_keras

Port of Single Shot MultiBox Detector to Keras
MIT License
1.1k stars 553 forks source link

I got an error: 'module' object is not callable #149

Open leikunx opened 5 years ago

leikunx commented 5 years ago

TypeError Traceback (most recent call last)

in () 1 input_shape=(300, 300, 3) ----> 2 model = SSD300(input_shape, num_classes=NUM_CLASSES) 3 model.load_weights('weights_SSD300.hdf5', by_name=True) 4 bbox_util = BBoxUtility(NUM_CLASSES) ~/my_ssd/ssd_keras/ssd.py in SSD300(input_shape, num_classes) 256 net['conv8_2_mbox_loc_flat'], 257 net['pool6_mbox_loc_flat']], --> 258 mode='concat', concat_axis=1, name='mbox_loc') 259 net['mbox_conf'] = merge([net['conv4_3_norm_mbox_conf_flat'], 260 net['fc7_mbox_conf_flat'], TypeError: 'module' object is not callable
yutaroyamanaka commented 5 years ago

Me too! I want to know how to solve this problem.

yutaroyamanaka commented 5 years ago

I found the solution!

Keras is updated, so we should use 'from keras.layers import concatenate' instead of 'from keras.layers import merge'

kurianbenoy commented 5 years ago

@yutaroyamanaka but changing import doesn't work. What exactly should we do to run the project correctly?