Skip to content

Commit

Permalink
fix predict bug
Browse files Browse the repository at this point in the history
  • Loading branch information
kexinhuang12345 committed Oct 26, 2021
1 parent 27283db commit 1dcef58
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion DeepPurpose/DDI.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ def predict(self, df_data):
pd.DataFrame
'''
print('predicting...')
info = data_process_loader(df_data.index.values, df_data.Label.values, df_data, **self.config)
info = data_process_DDI_loader(df_data.index.values, df_data.Label.values, df_data, **self.config)
self.model.to(device)
params = {'batch_size': self.config['batch_size'],
'shuffle': False,
Expand Down
3 changes: 1 addition & 2 deletions DeepPurpose/PPI.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,14 +353,13 @@ def predict(self, df_data):
pd.DataFrame
'''
print('predicting...')
info = data_process_loader(df_data.index.values, df_data.Label.values, df_data, **self.config)
self.model.to(device)
info = data_process_PPI_loader(df_data.index.values, df_data.Label.values, df_data, **self.config)
params = {'batch_size': self.config['batch_size'],
'shuffle': False,
'num_workers': self.config['num_workers'],
'drop_last': False,
'sampler':SequentialSampler(info)}

generator = data.DataLoader(info, **params)

score = self.test_(generator, self.model, repurposing_mode = True)
Expand Down
2 changes: 1 addition & 1 deletion DeepPurpose/ProteinPred.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ def predict(self, df_data, verbose = True):
'''
if verbose:
print('predicting...')
info = data_process_loader_Property_Prediction(df_data.index.values, df_data.Label.values, df_data, **self.config)
info = data_process_loader_Protein_Prediction(df_data.index.values, df_data.Label.values, df_data, **self.config)
self.model.to(device)
params = {'batch_size': self.config['batch_size'],
'shuffle': False,
Expand Down

0 comments on commit 1dcef58

Please sign in to comment.