Comments (4)
I created a new environment python==3.8.13 with pytorch=1.11.0 today, I tested on my computer(cpu), it works fine. I am also testing that on gpu now.
pip install torch==1.11.0
pip install scikit-learn==0.23.2
pip install Biopython==1.78
pip install rdkit-pypi
pip install seaborn==0.11.0
pip install Matplotlib==3.3.2
pip install pandas==1.1.3
pip install SciPy==1.5.2
pip install NumPy==1.20.2
Training...
Epoch Time(sec) RMSE_train R2_train MAE_dev MAE_test RMSE_dev RMSE_test R2_dev R2_test
1 1850.890769584 1.3438182532736704 0.1998537546862883 0.9035335875736547 0.9133727147194339 1.1992452517734593 1.2359207287270122 0.3549627178018241 0.32299921362051043
2 3714.328295292 1.084357741076502 0.4790051045211742 0.8155829147555056 0.827786833740544 1.0718060717840199 1.1102980169965346 0.4847698989405582 0.4536297183959668
3 5565.796247834 1.0039601096588002 0.5533974334491122 0.7873367654527741 0.8069042074566374 1.046123391943784 1.0935254266866503 0.509166011683243 0.4700123957534842
4 7421.475990792 0.9586988949066316 0.5927578201651297 0.7794618119884426 0.7914288478966054 1.0353950991924916 1.084159005412381 0.5191816743983877 0.4790525652715526
5 9266.206740167 0.9310297750368882 0.6159255295480108 0.7454487619816593 0.7643532149817572 1.011139254568574 1.0703361718545579 0.5414457282064841 0.4922518545061749
6 11125.5231325 0.9118198494526261 0.631611228691773 0.790947889391016 0.8055422126099699 1.0413691513693535 1.0933207478520355 0.5136171889336283 0.470210776313323
7 12984.743249333 0.8906566336945769 0.6485132858747704 0.7597130137872721 0.7625249781298686 1.0223852634093529 1.0676801557246463 0.5311888160688671 0.4947686600756299
8 14841.661516167 0.8750188583259594 0.6607474459657958 0.7765459976505641 0.7862476204838971 1.0301065805234337 1.0810044343642546 0.5240809108014289 0.48207975010564863
9 16692.103153875 0.8614303673156085 0.6712023877816913 0.7394888517778917 0.7643921505036454 1.0224698312506153 1.0881460149657793 0.5311112562860693 0.4752139373068053
10 18538.492715834 0.790652954533467 0.7230125473773831 0.7279709099352978 0.7501985592397513 1.0082084445331096 1.0707727209979077 0.5441001355827655 0.4918375879860142
from dlkcat.
We have tested it in pytorch = 1.4.0 and 1.8.0. Could this be the reason? I will test again today in pytorch 1.11.0, will let you know.
from dlkcat.
I tested a CPU run on pytorch=1.4.0, but I got a similar training history with the command I wrote. Here are the first 10 epochs
Epoch Time(sec) RMSE_train R2_train MAE_dev MAE_test RMSE_dev RMSE_test R2_dev R2_test
1 1799.3738492260454 1.4300474419985105 0.093872750637233 1.1220249858832454 1.120269724750849 1.4452466784056024 1.4633177762541145 0.06318731754995843 0.050958426455659955
2 3592.004232672043 1.361057561028385 0.17919255889212427 1.0730845817573005 1.0592566097688458 1.3718942067704682 1.3679814609925314 0.15586861831560928 0.17059172438793757
3 5395.483067929046 1.3306088168449604 0.21550696240926992 1.0587110773535187 1.056803738489438 1.355633245599969 1.3546850722451287 0.17576087913482286 0.1866365905160432
4 7205.411594508099 1.3139003745364772 0.23508500839068713 1.0498388265642649 1.0392077809579552 1.3514482404223975 1.3500219145964145 0.18084207726986423 0.19222654487030677
5 9061.130795708043 1.2988018518113706 0.25256385102031076 1.0517304778519334 1.0403759229673326 1.3645734090219308 1.3635168211241457 0.16485360677059235 0.17599671949939144
6 10892.622826825012 1.2909488882966267 0.2615749932689544 1.045592042422458 1.0386182284694494 1.3451212587044103 1.3451953064872948 0.18849411317486797 0.19799213481702715
7 12664.473319050041 1.281445919877912 0.2724064086264315 1.057109985958508 1.047079589826518 1.3602581657653914 1.3598782660418802 0.17012728644975328 0.1803885699595642
8 14405.505319613032 1.2747839340068512 0.27995197614892 1.0336260921603988 1.0305034704046387 1.340438009349556 1.3482086459813252 0.1941350446624892 0.19439499351976908
9 16294.816087790066 1.271886118601683 0.28322185526858723 1.0325258553756487 1.023831375006762 1.3334349881072143 1.3375600889186805 0.20253341498729838 0.20707055823955345
...
25 43949.70711359603 1.2212125746116513 0.33919878185838725 1.0221514104633171 1.0242531846619454 1.3326459844589709 1.3445351463183686 0.20347686989604497 0.19877911902582002
26 45594.636059042066 1.2194461549093851 0.3411090276759614 1.0218019473397688 1.0243150300529025 1.3316524246429056 1.3446511777670838 0.2046641294841648 0.1986408246401863
and the exported conda environment
Conda export
channels:
- pytorch
- conda-forge
- defaults
dependencies:
- _libgcc_mutex=0.1=main
- _openmp_mutex=5.1=1_gnu
- blas=1.0=mkl
- boost=1.70.0=py37h9de70de_1
- boost-cpp=1.70.0=ha2d47e9_1
- bottleneck=1.3.4=py37hce1f21e_0
- brotli=1.0.9=he6710b0_2
- brotlipy=0.7.0=py37h27cfd23_1003
- bzip2=1.0.8=h7f98852_4
- ca-certificates=2022.4.26=h06a4308_0
- cairo=1.16.0=h18b612c_1001
- certifi=2022.5.18.1=py37h06a4308_0
- cffi=1.15.0=py37hd667e15_1
- charset-normalizer=2.0.4=pyhd3eb1b0_0
- cpuonly=2.0=0
- cryptography=37.0.1=py37h9ce1e76_0
- cycler=0.11.0=pyhd3eb1b0_0
- dbus=1.13.18=hb2f20db_0
- expat=2.4.4=h295c915_0
- fontconfig=2.13.1=h6c09931_0
- fonttools=4.25.0=pyhd3eb1b0_0
- freetype=2.11.0=h70c0345_0
- giflib=5.2.1=h7b6447c_0
- glib=2.69.1=h4ff587b_1
- gst-plugins-base=1.14.0=h8213a91_2
- gstreamer=1.14.0=h28cd5cc_2
- icu=58.2=he6710b0_3
- idna=3.3=pyhd3eb1b0_0
- intel-openmp=2021.4.0=h06a4308_3561
- joblib=1.1.0=pyhd8ed1ab_0
- jpeg=9e=h7f8727e_0
- kiwisolver=1.4.2=py37h295c915_0
- lcms2=2.12=h3be6417_0
- ld_impl_linux-64=2.38=h1181459_1
- libblas=3.9.0=12_linux64_mkl
- libcblas=3.9.0=12_linux64_mkl
- libffi=3.3=he6710b0_2
- libgcc-ng=11.2.0=h1234567_1
- libgfortran-ng=7.5.0=ha8ba4b0_17
- libgfortran4=7.5.0=ha8ba4b0_17
- libgomp=11.2.0=h1234567_1
- libpng=1.6.37=hbc83047_0
- libstdcxx-ng=11.2.0=h1234567_1
- libtiff=4.2.0=h2818925_1
- libuuid=1.0.3=h7f8727e_2
- libwebp=1.2.2=h55f646e_0
- libwebp-base=1.2.2=h7f8727e_0
- libxcb=1.15=h7f8727e_0
- libxml2=2.9.14=h74e7548_0
- lz4-c=1.9.3=h295c915_1
- matplotlib=3.5.1=py37h06a4308_1
- matplotlib-base=3.5.1=py37ha18d171_1
- mkl=2021.4.0=h06a4308_640
- mkl-service=2.4.0=py37h7f8727e_0
- mkl_fft=1.3.1=py37hd3c417c_0
- mkl_random=1.2.2=py37h51133e4_0
- munkres=1.1.4=py_0
- ncurses=6.3=h7f8727e_2
- ninja=1.10.2=h06a4308_5
- ninja-base=1.10.2=hd09550d_5
- numexpr=2.8.1=py37h6abb31d_0
- numpy=1.21.5=py37h6c91a56_3
- numpy-base=1.21.5=py37ha15fc14_3
- openssl=1.1.1o=h7f8727e_0
- packaging=21.3=pyhd3eb1b0_0
- pandas=1.3.5=py37h8c16a72_0
- patsy=0.5.2=pyhd8ed1ab_0
- pcre=8.45=h295c915_0
- pillow=9.0.1=py37h22f2fdc_0
- pip=21.2.2=py37h06a4308_0
- pixman=0.38.0=h516909a_1003
- pycairo=1.21.0=py37h0afab05_1
- pycparser=2.21=pyhd3eb1b0_0
- pyopenssl=22.0.0=pyhd3eb1b0_0
- pyparsing=3.0.4=pyhd3eb1b0_0
- pyqt=5.9.2=py37h05f1152_2
- pysocks=1.7.1=py37_1
- python=3.7.13=h12debd9_0
- python-dateutil=2.8.2=pyhd3eb1b0_0
- python_abi=3.7=2_cp37m
- pytorch=1.4.0=py3.7_cpu_0
- pytorch-mutex=1.0=cpu
- pytz=2022.1=py37h06a4308_0
- qt=5.9.7=h5867ecd_1
- rdkit=2019.09.3=py37hb31dc5d_0
- readline=8.1.2=h7f8727e_1
- requests=2.27.1=pyhd3eb1b0_0
- scikit-learn=1.0.2=py37hf9e9bfc_0
- scipy=1.7.3=py37hc147768_0
- seaborn=0.11.2=hd8ed1ab_0
- seaborn-base=0.11.2=pyhd8ed1ab_0
- setuptools=61.2.0=py37h06a4308_0
- sip=4.19.8=py37hf484d3e_0
- six=1.16.0=pyhd3eb1b0_1
- sqlite=3.38.3=hc218d9a_0
- statsmodels=0.13.2=py37hb1e94ed_0
- threadpoolctl=3.1.0=pyh8a188c0_0
- tk=8.6.12=h1ccaba5_0
- torchvision=0.5.0=py37_cpu
- tornado=6.1=py37h27cfd23_0
- typing_extensions=4.1.1=pyh06a4308_0
- urllib3=1.26.9=py37h06a4308_0
- wheel=0.37.1=pyhd3eb1b0_0
- xorg-kbproto=1.0.7=h7f98852_1002
- xorg-libice=1.0.10=h7f98852_0
- xorg-libsm=1.2.2=h470a237_5
- xorg-libx11=1.7.2=h7f98852_0
- xorg-libxext=1.3.4=h7f98852_1
- xorg-libxrender=0.9.10=h7f98852_1003
- xorg-renderproto=0.11.1=h7f98852_1002
- xorg-xextproto=7.3.0=h7f98852_1002
- xorg-xproto=7.0.31=h7f98852_1007
- xz=5.2.5=h7f8727e_1
- zlib=1.2.12=h7f8727e_2
- zstd=1.5.2=ha4553b6_0
- pip:
- biopython==1.79
from dlkcat.
I was also facing the same problem training the model with both Pytorch 1.4 and 1.11. After debugging further, I found that the ReLU activations of the CNN can die in the first epoch when running run_model.py
on the data. After changing the activations to leaky ReLUs, the training output is now more similar to @feiranl's log.
def attention_cnn(self, x, xs, layer):
"""The attention mechanism is applied to the last layer of CNN."""
xs = torch.unsqueeze(torch.unsqueeze(xs, 0), 0)
for i in range(layer):
xs = F.leaky_relu(self.W_cnn[i](xs))
xs = torch.squeeze(torch.squeeze(xs, 0), 0)
Epoch Time(sec) RMSE_train R2_train MAE_dev MAE_test RMSE_dev RMSE_test R2_dev R2_test
1 108.62964485096745 1.3361766198360103 0.2033351364647331 0.9049852923208807 0.9035405645037045 1.1739503139604477 1.1962411549966967 0.38448252864269594 0.36331743904275005
2 215.53552481881343 1.1098560563182645 0.45035631927606645 0.8470982153573635 0.8373281794411068 1.118362950754359 1.1249759460757636 0.4413928441627386 0.43691760597692275
3 321.9014725498855 1.0284413477237342 0.5280380527224801 0.8129164308897753 0.8113835559586549 1.1062356064091905 1.1162905596245978 0.4534420469215621 0.4455786076611852
4 428.2206061058678 0.9848536956129555 0.5671959016923331 0.8319972615900284 0.8101702824537884 1.0914312427031414 1.0855119277410503 0.46797294830478653 0.4757304007854727
5 530.6794445267878 0.95100420025565 0.5964356479384888 0.8040076379878801 0.803888922863107 1.0908744412588334 1.0882729923015786 0.46851564464039996 0.4730599867096059
6 627.7551401329692 0.9307128999705022 0.6134733938115456 0.7895671279593413 0.7741680549853144 1.071451121014253 1.0666324692731286 0.48727360031773326 0.4938082356513165
7 724.7671971449163 0.9097414091836883 0.6306961348218802 0.8244057570181237 0.8146809501164135 1.092587815943168 1.090002043599753 0.46684478877643476 0.4713842489036103
8 821.8540824640077 0.8983011608152153 0.6399259293182231 0.7782960763231104 0.7795859852150637 1.0553856260032444 1.0727548623233278 0.502534116338722 0.4879805502048369
9 918.9646761238109 0.88158551056637 0.653201816500695 0.7618141485525484 0.7723324211238441 1.0382033122967171 1.0696761191005835 0.5186003474926817 0.4909152642062631
from dlkcat.
Related Issues (20)
- Dear author, you know that you have done a famous and complex work. Then, I meet a question that proteome data NOT 404 HOT 1
- two substrates HOT 1
- error running example HOT 3
- Failed parsing SMILES HOT 3
- Dataset problem HOT 3
- Example input.tsv file in DeeplearningApproach yields no kcats when run HOT 4
- Input a new sequence for measure Kcat using DLKcat HOT 1
- Reason for two kcat values in each PredcitedKcat343species file HOT 1
- Hyperparameter file for DLKcat HOT 3
- The dimension of the adjacency matrix is not consistent
- isssue about runing prediction_for_input.py HOT 4
- RMSE HOT 2
- result inconsistency HOT 1
- I can't find the file I'm looking for HOT 1
- RMSE and data HOT 7
- Unable to reproduce the results in Fig. 2a. HOT 2
- find the sequence HOT 3
- Can DLKcat parse the smiles including '.' ? HOT 2
- Loss calculation confusion HOT 2
- nomoudule name SOAPpy HOT 1
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 dlkcat.