Comments (4)
For sure, we can at least factorize __init__
, sample_from_posterior_z
, sample_from_posterior_l
, get_sample_scale
, get_sample_rate
based on the VAE class. I can take care of that. However the forward
methods seems difficult to inherit, so there will be full overriding for VAEC and SVAEC I imagine. I think SVAEC can't inherit anything VAEC: for the __init__
their Classifier has different n_input
, n_ouput
, and for the forward
the only edges in common are already the ones shared with VAE
.
from scvi-tools.
It does look like some parts of the forward
methods for all three classes are shared. e.g.,
and
It'd be good to avoid duplicating these part if possible, by storing them only in the base class (i.e. VAE).
from scvi-tools.
431d066: started doing it.
Not sure, however, about how to factorize forward
method without creating intermediary methods with long arguments list and long signatures.
from scvi-tools.
You're right -- we don't want tiny functions with long argument lists. Maybe fine to have some duplicated code in forward methods then.
from scvi-tools.
Related Issues (20)
- The scrna_raw_counts_properties method has an error in the calculation method of the raw_normalized_mean2 field, causing the raw_normalized_mean2 indicator to be invalid. HOT 4
- Issues installing recommended packages HOT 4
- Support the latest version of torchmetrics
- different hidden unit in each layer HOT 1
- cannot import name 'MRVI' from 'scvi.external' HOT 2
- bug for custom classifier in adversarial training plan HOT 2
- Error saving MrVI model HOT 2
- ImportError: cannot import name 'packaging' from 'pkg_resources' for Model Tuning using Ray HOT 4
- Issues in Load Dataset with SeuratData and convert to adata HOT 2
- Release 1.1.3
- Error computing posterior predictive check `calibration_error` HOT 1
- Expected value argument (Parameter of shape (7150,)) to be within the support (Real()) of the distribution Normal(loc: torch.Size([7150]), scale: torch.Size([7150])), but found invalid values: Parameter containing: tensor([nan, nan, nan, .. HOT 10
- Exception has occurred: ImportError cannot import name 'REGISTRY_KEYS' from 'scvi' HOT 3
- Trying to run PeakVI model returns mpi4py error HOT 2
- CellAssign tensor size error HOT 3
- Question about the output of scVI and scANVI HOT 2
- Specifying cell types in the new MRVI tool HOT 1
- Discussion thread: New DestVI model that supports Visium HD (single-cell spatial transcriptomics) data - Timeline, releases and alternatives HOT 2
- Error in py_call_impl(callable, call_args$unnamed, call_args$named) HOT 2
- AttributeError: module 'numpy' has no attribute 'str'. HOT 5
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 scvi-tools.