Code Monkey home page Code Monkey logo

Comments (10)

kp1181 avatar kp1181 commented on July 17, 2024 2

In def data_generator, while yielding use
yield [np.array(X1), np.array(X2)], np.array(y)

from automatic-image-captioning.

kp1181 avatar kp1181 commented on July 17, 2024

@GorillaBus did you manage to get past the above error?

from automatic-image-captioning.

GorillaBus avatar GorillaBus commented on July 17, 2024

@kp1181 Hi, thanks for your reply. Let me check this tonight and I'll write back. Thanks!

from automatic-image-captioning.

jha-vineet69 avatar jha-vineet69 commented on July 17, 2024

@GorillaBus Did it work?

from automatic-image-captioning.

KirolosAdeib avatar KirolosAdeib commented on July 17, 2024

Did anyone figure out the error reason?

from automatic-image-captioning.

Abhishek1236 avatar Abhishek1236 commented on July 17, 2024

yield ([array(X1), array(X2)], array(y)) this will work for sure .
Thanks

from automatic-image-captioning.

poojapatil16 avatar poojapatil16 commented on July 17, 2024

Can anyone please help me to debug this error?
ValueError: in user code:
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/training.py:805 train_function *
return step_function(self, iterator)
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/training.py:795 step_function **
outputs = model.distribute_strategy.run(run_step, args=(data,))
/usr/local/lib/python3.7/dist-packages/tensorflow/python/distribute/distribute_lib.py:1259 run
return self._extended.call_for_each_replica(fn, args=args, kwargs=kwargs)
/usr/local/lib/python3.7/dist-packages/tensorflow/python/distribute/distribute_lib.py:2730 call_for_each_replica
return self._call_for_each_replica(fn, args, kwargs)
/usr/local/lib/python3.7/dist-packages/tensorflow/python/distribute/distribute_lib.py:3417 _call_for_each_replica
return fn(*args, **kwargs)
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/training.py:788 run_step **
outputs = model.train_step(data)
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/training.py:754 train_step
y_pred = self(x, training=True)
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/base_layer.py:998 call
input_spec.assert_input_compatibility(self.input_spec, inputs, self.name)
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/input_spec.py:207 assert_input_compatibility
' input tensors. Inputs received: ' + str(inputs))
ValueError: Layer model_1 expects 2 input(s), but it received 3 input tensors. Inputs received: [<tf.Tensor 'IteratorGetNext:0' shape=(None, None) dtype=float32>, <tf.Tensor 'IteratorGetNext:1' shape=(None, None) dtype=int32>, <tf.Tensor 'IteratorGetNext:2' shape=(None, None) dtype=float32>]

from automatic-image-captioning.

jha-vineet69 avatar jha-vineet69 commented on July 17, 2024

@poojapatil16 Did you try @kp1181's solution? It worked for me.

from automatic-image-captioning.

Abhishek1236 avatar Abhishek1236 commented on July 17, 2024

from automatic-image-captioning.

poojapatil16 avatar poojapatil16 commented on July 17, 2024

Thanks for your replies, issue is resolved.

from automatic-image-captioning.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.