Code Monkey home page Code Monkey logo

defus3r / automatic-signature-verification Goto Github PK

View Code? Open in Web Editor NEW
22.0 3.0 7.0 1.43 GB

Python implementation of Automatic Signature Stability Analysis And Verification Using Local Features by Muhammad Imran Malik, Marcus Liwicki, Andreas Dengel, Seiichi Uchida, Volkmar Frinken published in 2014 at14th International Conference on Frontiers in Handwriting Recognition and some experiments in Keras-Tensorflow on Automatic Signature Verification using CNNs in vanilla and Siamese architecture

Jupyter Notebook 99.98% Python 0.02%
digital-image-processing computer-vision deep-learning siamese-cnn signature-verification machine-learning

automatic-signature-verification's Issues

Getting ValueError: New layer sequential_1 expects 20 weights, but the saved weights have 12 elements.

I have tried the example on Google Colab to generate the model. I then tried to run the test using a saved file (.h5) on my local machine.

However I keep getting the following error:

ValueError: Layer #0 (named "sequential_1" in the current model) was found to correspond to layer sequential_1 in the save file. However the new layer sequential_1 expects 20 weights, but the saved weights have 12 elements.

I tried to run through the related portion of the codes but really failed to identify where the error was generating from.

The full traceback is:

Traceback (most recent call last):
File "./run_cedar.py", line 545, in
acc_thresh.append(load_and_check_model('./Weights/signet-cedar-full-xavier-001.h5'))
File "./run_cedar.py", line 518, in load_and_check_model
model.load_weights(weight)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/tensorflow/python/keras/_impl/keras/engine/topology.py", line 1107, in load_weights
load_weights_from_hdf5_group(f, self.layers)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/tensorflow/python/keras/_impl/keras/engine/topology.py", line 1514, in load_weights_from_hdf5_group
str(len(weight_values)) + ' elements.')
ValueError: Layer #0 (named "sequential_1" in the current model) was found to correspond to layer sequential_1 in the save file. However the new layer sequential_1 expects 20 weights, but the saved weights have 12 elements.

Could you guide me as to where the error might be coming from?

PS. Another thing that I came across was that after the end of the epoch 6 (run on Colab), the loss was coming to nan.

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.