JackieHanLab / TOSICA

Transformer for One-Stop Interpretable Cell-type Annotation
MIT License
121 stars 23 forks source link

Fix bugs and improve performance #20

Open sldyns opened 9 months ago

sldyns commented 9 months ago
  1. Resolved the issue of continuous GPU memory growth by altering weights = attn to weights = attn.detach().
  2. Enhanced execution speed, decreasing memory consumption, by substituting the masked Multi-Layer Perceptron (MLP) operation within FeatureEmbed with sparse matrix multiplication via the creation of a new SparseLinear class.
  3. No need for torch==1.7.1, it works perfectly with torch==2.1.0.