deeptime-ml / deeptime

Python library for analysis of time series data including dimensionality reduction, clustering, and Markov model estimation
https://deeptime-ml.github.io/
GNU Lesser General Public License v3.0
747 stars 82 forks source link

add device option for TAE class #211

Closed philipyoung9561 closed 2 years ago

philipyoung9561 commented 2 years ago

Hi! I just found the device of the TAE class is not allowed to be specified when I was playing the time-lagged auto-encoder. After checked the code, I found a self.device actually does appear in the fit function but without initialization. So I just added an option for device in the init function so that one can choose to use either cpu or gpu to train the model.

codecov[bot] commented 2 years ago

Codecov Report

Merging #211 (20879f7) into main (35db879) will increase coverage by 0.00%. The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #211   +/-   ##
=======================================
  Coverage   93.75%   93.75%           
=======================================
  Files         136      136           
  Lines       10789    10790    +1     
=======================================
+ Hits        10115    10116    +1     
  Misses        674      674           
Impacted Files Coverage Δ
deeptime/decomposition/deep/_tae.py 99.06% <100.00%> (+<0.01%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 35db879...20879f7. Read the comment docs.

clonker commented 2 years ago

Looks good to me, thank you for your contribution!