Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Neuralized K-Means #197

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open

Neuralized K-Means #197

wants to merge 10 commits into from

Commits on Aug 17, 2023

  1. Neuralized K-Means

    - documentation in numpydoc format
    - pylint + flake8 stuff
    - KMeansCanonizer
    - NeuralizedKMeans layer
    - LogMeanExpPool layer
    - Distance layer
    - Distance type
    jacobkauffmann committed Aug 17, 2023
    Configuration menu
    Copy the full SHA
    f3b6ba2 View commit details
    Browse the repository at this point in the history

Commits on Aug 18, 2023

  1. Tutorial: Neuralized K-Means

    - Explaining Deep Cluster Assignments with Neuralized K-Means on Image Data
    - I tried to adhere to guidelines
    - That means: random data, random weights
    - Code for real data and real weights in comments
    - Runs on colab, did not test blender
    - also adds the reference to docs/source/tutorial/index.rst
    jacobkauffmann committed Aug 18, 2023
    Configuration menu
    Copy the full SHA
    077d583 View commit details
    Browse the repository at this point in the history

Commits on Aug 24, 2023

  1. Update src/zennit/layer.py

    Co-authored-by: Christopher <15217558+chr5tphr@users.noreply.github.com>
    jackmcrider and chr5tphr committed Aug 24, 2023
    Configuration menu
    Copy the full SHA
    465d8bf View commit details
    Browse the repository at this point in the history
  2. Update src/zennit/layer.py

    change `torch.log(torch.tensor(n_dims, dtype=...))` to `math.log(n_dims)`
    
    Co-authored-by: Christopher <15217558+chr5tphr@users.noreply.github.com>
    jackmcrider and chr5tphr committed Aug 24, 2023
    Configuration menu
    Copy the full SHA
    f38a663 View commit details
    Browse the repository at this point in the history
  3. Update src/zennit/canonizers.py

    change `setattr(parent_module, ...)` to `parent_module.add_module(...)`
    
    Co-authored-by: Christopher <15217558+chr5tphr@users.noreply.github.com>
    jackmcrider and chr5tphr committed Aug 24, 2023
    Configuration menu
    Copy the full SHA
    661d280 View commit details
    Browse the repository at this point in the history
  4. Update src/zennit/canonizers.py

    add spaces around binary operators
    
    Co-authored-by: Christopher <15217558+chr5tphr@users.noreply.github.com>
    jackmcrider and chr5tphr committed Aug 24, 2023
    Configuration menu
    Copy the full SHA
    bf31955 View commit details
    Browse the repository at this point in the history

Commits on Sep 8, 2023

  1. Neuralized k-means: MinPool and Backward Hooks via Conv

    - rename Distance to PairwiseCentroidDistance
    - remove LogMeanExpPool (might become relevant again, but not for now)
    - add MinPool1d and MinPool2d in layer.py
    - add MinTakesMost1d, MaxTakesMost1d, MinTakesMost2d, MaxTakesMost2d rules
      - largely untested. especially kernel_size as int or kernel_size as tuple
      - in principle, MaxTakesMost2d should also work for MaxPoll2d layers in
        standard conv nets - but needs some testing
    - add abstract TakesMostBase class
    - remove type definition for Distance in types.py
    - adapt KMeans canonizer:
      - replace LogMeanExpPool with MinPool1d followed by torch.nn.Flatten
      - remove beta parameter; beta is now sit in MinTakesMost1d
      - remove deepcopy and simply return the module itself
    - update docs/src/tutorials/deep_kmeans.ipynb
    - doc strings
    jacobkauffmann committed Sep 8, 2023
    Configuration menu
    Copy the full SHA
    3ee1642 View commit details
    Browse the repository at this point in the history
  2. Merge branch 'master' of github.com:jackmcrider/zennit

    - merge changes coming from github web interface
    jacobkauffmann committed Sep 8, 2023
    Configuration menu
    Copy the full SHA
    6a55fde View commit details
    Browse the repository at this point in the history
  3. tox compliance

    - various non-functional changes
    jacobkauffmann committed Sep 8, 2023
    Configuration menu
    Copy the full SHA
    7fb44cc View commit details
    Browse the repository at this point in the history

Commits on Nov 10, 2023

  1. max takes most fix

    jacobkauffmann committed Nov 10, 2023
    Configuration menu
    Copy the full SHA
    b042aae View commit details
    Browse the repository at this point in the history