Skip to content
This repository has been archived by the owner on Nov 28, 2023. It is now read-only.

Commit

Permalink
Merge branch 'development' into issue92_atomdensity
Browse files Browse the repository at this point in the history
  • Loading branch information
CunliangGeng committed Sep 18, 2019
2 parents 4bd1a58 + 5bc7968 commit fb37bed
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
2 changes: 1 addition & 1 deletion deeprank/config/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
logger = logging.getLogger('deeprank')

# Default PSSM path
PATH_PSSM_SOURCE = None
PATH_PSSM_SOURCE = None
2 changes: 0 additions & 2 deletions deeprank/learn/DataSet.py
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,6 @@ def filter(self, molgrp):
Args:
molgrp (str): group name of the molecule in the hdf5 file
Returns:
bool: True if we keep the complex False otherwise
Expand Down Expand Up @@ -637,7 +636,6 @@ class parameter self.select_feature examples:
'Features': ['PSSM_*', 'pssm_ic_*']}
Feature type must be: 'AtomicDensities' or 'Features'.
Raises:
KeyError: Wrong feature type.
KeyError: Wrong feature type.
Expand Down
17 changes: 12 additions & 5 deletions deeprank/learn/NeuralNet.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ def __init__(self, data_set, model,
"""Train a Convolutional Neural Network for DeepRank.
Args:
data_set (deeprank.DataSet or str): Data set used for
data_set (deeprank.DataSet or list(str)): Data set used for
training or testing.
- deeprank.DataSet for training;
- str (e.g. 'xxx.hdf5') for testing when pretrained
model is loaded.
- str or list(str), e.g. 'x.hdf5', ['x1.hdf5', 'x2.hdf5'],
for testing when pretrained model is loaded.
model (nn.Module): Definition of the NN to use.
Must subclass nn.Module.
Expand Down Expand Up @@ -81,14 +81,21 @@ def __init__(self, data_set, model,
ValueError: if task is not recognized
Examples:
>>> # create the network
Train models:
>>> data_set = Dataset(...)
>>> model = NeuralNet(data_set, cnn,
... model_type='3d', task='reg',
... plot=True, save_hitrate=True,
... outdir='./out/')
>>> # start the training
>>> model.train(nepoch = 50, divide_trainset=0.8,
... train_batch_size = 5, num_workers=0)
Test a model on new data:
>>> data_set = ['test01.hdf5', 'test02.hdf5']
>>> model = NeuralNet(data_set, cnn,
... pretrained_model = './model.pth.tar',
... outdir='./out/')
>>> model.test()
"""

# ------------------------------------------
Expand Down

0 comments on commit fb37bed

Please sign in to comment.