Code Monkey home page Code Monkey logo

Comments (4)

jasmcaus avatar jasmcaus commented on May 18, 2024

Hi @VibhuAg! Thanks for bringing this to my attention.
Can you confirm which version of canaro you are on and whether upgrading to v1.0.9 helps fix this issue?
You can do a simple pip install --upgrade canaro

from opencv-course.

VibhuAg avatar VibhuAg commented on May 18, 2024

Hi @jasmcaus, this fixed the initial value error but now I am getting a different value error:
'---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
in
2 model = canaro.models.createSimpsonsModel(IMG_SIZE=IMG_SIZE, channels=channels, output_dim=len(characters),
3 loss='binary_crossentropy', decay=1e-7, learning_rate=0.001, momentum=0.9,
----> 4 nesterov=True)

/opt/conda/lib/python3.7/site-packages/canaro/models/simpsons.py in createSimpsonsModel(IMG_SIZE, channels, output_dim, loss, decay, learning_rate, momentum, nesterov)
42 output = Dense(output_dim, activation='softmax', name='output_node')(model)
43
---> 44 model = Model(inputs=input, outputs=output)
45
46 optimizer = SGD(lr=learning_rate, decay=decay, momentum=momentum, nesterov=nesterov)

/opt/conda/lib/python3.7/site-packages/tensorflow/python/keras/engine/training.py in new(cls, *args, **kwargs)
240 # Functional model
241 from tensorflow.python.keras.engine import functional # pylint: disable=g-import-not-at-top
--> 242 return functional.Functional(*args, **kwargs)
243 else:
244 return super(Model, cls).new(cls, *args, **kwargs)

/opt/conda/lib/python3.7/site-packages/tensorflow/python/training/tracking/base.py in _method_wrapper(self, *args, **kwargs)
455 self._self_setattr_tracking = False # pylint: disable=protected-access
456 try:
--> 457 result = method(self, *args, **kwargs)
458 finally:
459 self._self_setattr_tracking = previous_value # pylint: disable=protected-access

/opt/conda/lib/python3.7/site-packages/tensorflow/python/keras/engine/functional.py in init(self, inputs, outputs, name, trainable)
113 # 'arguments during initialization. Got an unexpected argument:')
114 super(Functional, self).init(name=name, trainable=trainable)
--> 115 self._init_graph_network(inputs, outputs)
116
117 @trackable.no_automatic_dependency_tracking

/opt/conda/lib/python3.7/site-packages/tensorflow/python/training/tracking/base.py in _method_wrapper(self, *args, **kwargs)
455 self._self_setattr_tracking = False # pylint: disable=protected-access
456 try:
--> 457 result = method(self, *args, **kwargs)
458 finally:
459 self._self_setattr_tracking = previous_value # pylint: disable=protected-access

/opt/conda/lib/python3.7/site-packages/tensorflow/python/keras/engine/functional.py in _init_graph_network(self, inputs, outputs)
142 base_layer_utils.create_keras_history(self._nested_outputs)
143
--> 144 self._validate_graph_inputs_and_outputs()
145
146 # A Network does not create weights of its own, thus it is already

/opt/conda/lib/python3.7/site-packages/tensorflow/python/keras/engine/functional.py in _validate_graph_inputs_and_outputs(self)
637 'must come from tf.keras.Input. '
638 'Received: ' + str(x) +
--> 639 ' (missing previous layer metadata).')
640 # Check that x is an input tensor.
641 # pylint: disable=protected-access

ValueError: Input tensors to a Functional must come from tf.keras.Input. Received: <bound method Kernel.raw_input of <ipykernel.ipkernel.IPythonKernel object at 0x7fadb717a7d0>> (missing previous layer metadata).'

from opencv-course.

jasmcaus avatar jasmcaus commented on May 18, 2024

On further inspection, this seemed to be from a bug with canaro. I've fixed it in v1.1.0, so hopefully, things should work fine now.
You may upgrade your version of canaro via a pip install --upgrade canaro.

from opencv-course.

VibhuAg avatar VibhuAg commented on May 18, 2024

Thanks!

from opencv-course.

Related Issues (19)

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.