Giter Site home page Giter Site logo

Dimension problem about bhtsne HOT 3 CLOSED

lvdmaaten avatar lvdmaaten commented on July 25, 2024
Dimension problem

from bhtsne.

Comments (3)

lvdmaaten avatar lvdmaaten commented on July 25, 2024

I have never used h5py, does it return a NumPy array?

The most likely explanations would be your process not having permissions to create a temporary directory here or a temporary file here. This will be difficult to debug for me without a repro.

from bhtsne.

dcharua avatar dcharua commented on July 25, 2024

Thank you for the quick response, It does returns a numpy array if I run data.shape I get (2462, 3, 32, 32).
so the error is here:

File "bhtsne.py", line 112, in init_bh_tsne
cov_x = np.dot(np.transpose(samples), samples)
ValueError: shapes (32,32,3,2462) and (2462,3,32,32) not aligned: 2462 (dim 3) != 32 (dim 2)

Something about the dimensions doesn't add up when doing the .dot between the transpose and the original matrix, maybe since is a big array with the whole dataset.

How can I import my dataset? I can try to read directly from the folders into a np.array but in what format does it needs to be? an array for each image? or a 4d array with all images? and does it need the labels?

Thank you very much

from bhtsne.

lvdmaaten avatar lvdmaaten commented on July 25, 2024

Your dataset should be a matrix of size NxD, where N is the number of examples and D is the number of dimensions. Please reshape your data matrix to size 2462x(3x32x32) before feeding it to t-SNE.

from bhtsne.

Related Issues (20)

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.