Warm tip: This article is reproduced from stackoverflow.com, please click
keras python

Why model.fit_generator() has Attribution Error?

发布于 2020-04-05 23:36:21

I am rerunning my kernel with an updated model. Previously the kernel works well, I've run for 6 times. But today this kernel throws the following error:

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-18-e6baca729854> in <module>
      1 # don't use hardcode video numbers
----> 2 pred = model.predict_generator(pred_gen, steps=len(filenames)//BATCH_SIZE)

...

    AttributeError: module 'tensorflow.python.ops.script_ops' has no attribute 'numpy_function'
Questioner
Shark Deng
Viewed
69
Shark Deng 2020-02-17 19:59

The problem is solved. When I ran the code again today, it ran well without error and the speed is quite fast. I guess it's something wrong with the network connection.