Git Product home page Git Product logo

Comments (1)

Boylad avatar Boylad commented on August 17, 2024

I have no issue working on load_data.py under omniglot dataset, and was able to run SiameseNet.ipynb.
However, Its only when I switch to my own dataset, I noticed you used np.stack, which errors out when my number of images in each folder is different from the next folder. Is this a requirement for Siamese to work properly? How can I get pass this?

  File "load_data.py", line 64, in <module>
    X,y,c=loadimgs(train_folder)
  File "load_data.py", line 61, in loadimgs
    X = np.stack(X)
  File "C:\Users\Noel Tam\AppData\Local\conda\conda\envs\py36\lib\site-packages\numpy\core\shape_base.py", line 353, in stack
    raise ValueError('all input arrays must have the same shape')
ValueError: all input arrays must have the same shape

load_data.py line 48:
image = np.array(Image.fromarray(imageio.imread(image_path)).resize([300, 300]))
I used 300 pixel by pixel for my image, the default is 105 by 105 in .ipynb file, and also for a version problem in scipy, I used pillow(PIL) to read images.

from keras-oneshot.

Related Issues (17)

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.