RobinKa / tfga

Python package for Geometric / Clifford Algebra with TensorFlow
MIT License
47 stars 7 forks source link

Availability of Exp(.) and Log(.) #27

Closed dcunited001 closed 1 year ago

dcunited001 commented 1 year ago

Does this library have the capability mentioned in #14? I should be working in PGA (G+ 3,0,1) and I'm trying to grok the text mentioned below as to whether I need CGA (4,1) or Lie Alg/Group transformations.

Utilizing chained applications of screws/motors on MediaPipe landmarks without actual kinematics should be sufficient (though I'm hand-waving here without fully understanding much...)

Depending on how complicated things become, I may abandon using GA anyways, as the code I'm writing for Kaggle cloud instances requires Python 3.7 and code that diverges on my local machine is already an existential risk. The TF Lite submission can be developed wherever and only needs to be submitted online.

However, I have an AMD GPU and I'm running into some compatibility issues anyways. I got a docker container to run with ROCm and I'm checking the functionality now. Your library seems to extend TF without adding C++ code, so AFAIK it wouldn't need a rebuild. The errors I'm getting now involve SEE3/etc and AVX/2 instructions in oneDNN which indicates I need to rebuild anyways. I think I can handle that.

I don't really need help with the model and that may be against the rules. I'm not sure. To give you some background on what I'm doing:

The project is for a Kaggle competition using MediaPipe data on ASL and I think using GA would give me an advantage. I have this GA Applications text for Robotics to help me, but the math is a bit over my head. I understand some aspects from a high-level.

What I'm hoping to gain via GA is using some multivector values for data analysis & training, potentially using this method for live classification, but the rules require the TFLite build to be less than 40MB. Other submissions are reportedly less than 5MB which seems low.

dcunited001 commented 1 year ago

Ahhh so it seems to be working with my environment. I just need to watch the types. I still might bail though if it gets too complex ... or double or dual.

RobinKa commented 1 year ago

On master there are only approximations for exp and log, however there's a PR which implements the invariant decomposition in #21 and uses it for exp(), but not log() yet. It was tricky making it work with tensorflow natively.

If you want to learn more aobut GA you could join our Discord server https://discord.gg/vGY6pPk (https://bivector.net/), we have channels for beginner questions and programming which you might find interesting :)