Giter Club home page Giter Club logo

Comments (4)

zoldaten avatar zoldaten commented on May 18, 2024
  1. this code doesnt work either:
tsne_to_grid_plotter_manual(tsne_results[:, 0], tsne_results[:, 1],
                            selected_filenames)
---------------------------------------------------------------------------
IndexError                                Traceback (most recent call last)
Cell In[72], line 1
----> 1 tsne_to_grid_plotter_manual(tsne_results[:, 0], tsne_results[:, 1],
      2                             selected_filenames)

Cell In[71], line 11, in tsne_to_grid_plotter_manual(x, y, selected_filenames)
      9 x_y_dict = {}
     10 for i, image_path in enumerate(selected_filenames):
---> 11     a = np.ceil(x[i] * (S - s))
     12     b = np.ceil(y[i] * (S - s))
     13     a = int(a - np.mod(a, s))

IndexError: index 2176 is out of bounds for axis 0 with size 2176

from practical-deep-learning-book.

zoldaten avatar zoldaten commented on May 18, 2024
  1. and this:
for i in range(3):
    random_image_index = random.randint(0, num_images)
    distances, indices = neighbors.kneighbors(
        [feature_list[random_image_index]])
    # Don't take the first closest image as it will be the same image
    similar_image_paths = [filenames[random_image_index]] + \
        [filenames[indices[0][i]] for i in range(1, 4)]
    plot_images(similar_image_paths, distances[0])

gives:
IndexError: index 5281 is out of bounds for axis 0 with size 2176

but i fix this point:
random_image_index = random.randint(0, 2176)

from practical-deep-learning-book.

zoldaten avatar zoldaten commented on May 18, 2024

perhaps, it because i have less features extracted:

num_images = len(filenames)
num_features_per_image = len(feature_list[0])
print("Number of images = ", num_images)
print("Number of features per image = ", num_features_per_image)

Number of images =  8677
Number of features per image =  2048

in Books example:

Number of images =  8677
Number of features per image =  100352

dont know why that happened ?

from practical-deep-learning-book.

zoldaten avatar zoldaten commented on May 18, 2024

fixed in #169

from practical-deep-learning-book.

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.