GithubHelp home page GithubHelp logo

Comments (2)

offchan42 avatar offchan42 commented on June 18, 2024
  1. Yes. There are many ways to do it. This depends on the nature of your problem. Do you have no clue how to solve your problem and want the features to be used as early in the network as possible? Then the easiest way is to treat additional features as extra properties. You can duplicate them and concatenate them to the properties of each object. I use the vocab written in the docstring of this file: https://github.com/off99555/superkeras/blob/master/permutational_layer.py

For example, if your object consists of 5 properties, and you have 2 extra features, then you could treat your object as having 7 properties, where the last 2 properties are the same for all objects. The extra features are called global features. Intuitively, your object could be a moving ball with properties like position, velocity, and acceleration. If you want to add extra features like the friction of the ground, you can think of it as a global feature that every ball shares. So if the friction is 0.8, then all the balls should have friction=0.8 as its extra feature.
I discovered this global feature duplication trick from PointNet architecture.

Another way is to include the extra features later in the network. After you merge the objects into one vector, then you can concatenate the extra features to this vector. If your network does not have merging, then the global features duplication trick is needed. You just need to decide when to concatenate the global features. You can choose to concatenate as early as possible or you can concatenate after 2 permutational layers, it's up to you.

  1. Maybe it's possible to use but you will have to rethink the architecture. The code was not designed for that kind of usage. The paper also did not prepare for that use case. So I'm not sure if it will work. You have to tinker with the idea yourself, come up with architecture ideas first.

from superkeras.

offchan42 avatar offchan42 commented on June 18, 2024

By the way, I suggest using PointNet architecture for permutation invariant instead of PermutationalLayer if you have many objects as input e.g. more than 5. Because running many comparisons using PermutationalLayer is expensive. If you have 5 objects there will be 5**2=25 comparisons using PairwiseModel.

from superkeras.

Related Issues (6)

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.