Comments (5)
- Caching can't be used when user applies some kind of augmentations during training process
- Caching can't be used when encoder is not fully frozen
from quaterion.
@joein Good work! My comments are as follows:
- We can move
CacheType
intoutils.enums
, and renametrain.encoders
totrain.cachable_encoders
. Users are supposed to interact only with the CacheType, so we should **hide ** unnecessary complexity from them. - Do we really need separate classes for CPU and GPU caches? It seems to me that we can merge them into one by calling
.to(device)
conditionally when applicable. forward()
seems to be overridden inCacheEncoder
without extra functionality.
from quaterion.
@monatis Thanks for the comments
1.1 I am not sure if we need to separate CacheConfig
and CacheType
in this case, user is supposed to use both CacheConfig
and CacheType
, however I am not really against it.
1.2 It was supposed that we store any train-specific (which shouldn't be in quaterion-models
) encoders in train.encoders
, I think that it will be something like train.encoders.cache_encoders
later, but at the moment I'd like to remain it as is.
2.1 I had some minds about it too, we probably can do this.
3.1 It was done to avoid IDE remarks (child classes should implement all abstract methods).
from quaterion.
3.1 It was done to avoid IDE remarks (child classes should implement all abstract methods).
CacheEncoder
is an abstract class, so it could be declared with https://docs.python.org/3/library/abc.html
from quaterion.
Yes, indeed, but I think it is better to use one approach with abstract classes in both quaterion
and quaterion-models
. E.g. in quaterion_models
and in quaterion.loss.pairwise_loss
we don't use abc
.
from quaterion.
Related Issues (20)
- Badges in readme
- [BUG] ImportError: cannot import name 'PossibleUserWarning' from 'pytorch_lightning.utilities.warnings' HOT 2
- [bug] broken links in documentation
- [docs] Add README.md to `examples` HOT 2
- Implement cross-batch memory for losses HOT 2
- PyTorch Lightning's Stochastic Weight Averging callback causes infinite recursion HOT 4
- Add Quaterion to conda channel
- what is the use of freezing the encoder ? HOT 2
- Add support for soft margin variant of triplet loss
- Inplace computation error with XBM HOT 10
- Reduce amount of memory required by mining strategies HOT 2
- Implement multi-objective loss HOT 2
- Improve evaluation procedure for extensive results HOT 1
- Training error using multiple GPUs
- How to load encoder HOT 3
- error while serving the model HOT 5
- No Python 3.9/3.10 support of quaternion and quaternion-models HOT 2
- Feature: FastAP Loss Function HOT 2
- Improvement: Update internal `torch.norm` calls to `torch.linalg.norm` HOT 2
- Support for Python 3.10+ HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from quaterion.