ZFTurbo/Keras-inference-time-optimizer

AttributeError: 'list' object has no attribute 'copy'

mosheliv opened this issue · 6 comments

Hi,
I have just got around for trying to improve inference. unfortunatly, it still fails:

    model = reduce_keras_model(model)
  File "/home/m/.local/lib/python2.7/site-packages/kito/__init__.py", line 334, in reduce_keras_model
    new_layer = reduce_keras_model(new_layer, verbose=verbose)
  File "/home/m/.local/lib/python2.7/site-packages/kito/__init__.py", line 351, in reduce_keras_model
    output_tensor, output_names = get_layers_without_output(tmp_model, verbose)
  File "/home/m/.local/lib/python2.7/site-packages/kito/__init__.py", line 145, in get_layers_without_output
    output_tensor = model.outputs.copy()
AttributeError: 'list' object has no attribute 'copy'

Do you have example of model which fails?

It's the problem with Python 2:
https://stackoverflow.com/questions/2612802/how-to-clone-or-copy-a-list

I will change this part of code to work in Python 2 as well and write here when it's done.

Updated to 1.0.2. Must work now)

It worked on inceptionresnetv2 but there was no performance gain. Ill try again with resnet later.
Thank you for the support!