Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
SENSE-PPI
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Konstantin Volzhenin
SENSE-PPI
Commits
f2864b0e
Commit
f2864b0e
authored
Nov 06, 2023
by
Konstantin Volzhenin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
0.6.0 minor changes
parent
0999af3c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
__init__.py
senseppi/__init__.py
+1
-1
model.py
senseppi/model.py
+5
-5
No files found.
senseppi/__init__.py
View file @
f2864b0e
__version__
=
"0.
5.9
"
__version__
=
"0.
6.0
"
__author__
=
"Konstantin Volzhenin"
__author__
=
"Konstantin Volzhenin"
from
.
import
model
,
commands
,
esm2_model
,
dataset
,
utils
,
network_utils
from
.
import
model
,
commands
,
esm2_model
,
dataset
,
utils
,
network_utils
...
...
senseppi/model.py
View file @
f2864b0e
...
@@ -12,9 +12,9 @@ import torch.optim as optim
...
@@ -12,9 +12,9 @@ import torch.optim as optim
import
numpy
as
np
import
numpy
as
np
class
Dynamic
LSTM
(
pl
.
LightningModule
):
class
Dynamic
GRU
(
pl
.
LightningModule
):
"""
"""
Dynamic
LSTM
module, which can handle variable length input sequence.
Dynamic
GRU
module, which can handle variable length input sequence.
Parameters
Parameters
----------
----------
...
@@ -33,12 +33,12 @@ class DynamicLSTM(pl.LightningModule):
...
@@ -33,12 +33,12 @@ class DynamicLSTM(pl.LightningModule):
-------
-------
output: tensor, shaped [batch, max_step, num_directions * hidden_size],
output: tensor, shaped [batch, max_step, num_directions * hidden_size],
tensor containing the output features (h_t) from the last layer
tensor containing the output features (h_t) from the last layer
of the
LSTM
, for each t.
of the
GRU
, for each t.
"""
"""
def
__init__
(
self
,
input_size
,
hidden_size
=
100
,
def
__init__
(
self
,
input_size
,
hidden_size
=
100
,
num_layers
=
1
,
dropout
=
0.
,
bidirectional
=
False
,
return_sequences
=
False
):
num_layers
=
1
,
dropout
=
0.
,
bidirectional
=
False
,
return_sequences
=
False
):
super
(
Dynamic
LSTM
,
self
)
.
__init__
()
super
(
Dynamic
GRU
,
self
)
.
__init__
()
self
.
lstm
=
torch
.
nn
.
GRU
(
self
.
lstm
=
torch
.
nn
.
GRU
(
input_size
,
hidden_size
,
num_layers
,
bias
=
True
,
input_size
,
hidden_size
,
num_layers
,
bias
=
True
,
...
@@ -221,7 +221,7 @@ class SensePPIModel(BaselineModel):
...
@@ -221,7 +221,7 @@ class SensePPIModel(BaselineModel):
self
.
encoder_features
=
self
.
hparams
.
encoder_features
self
.
encoder_features
=
self
.
hparams
.
encoder_features
self
.
hidden_dim
=
256
self
.
hidden_dim
=
256
self
.
lstm
=
Dynamic
LSTM
(
self
.
encoder_features
,
hidden_size
=
128
,
num_layers
=
3
,
dropout
=
0.5
,
bidirectional
=
True
)
self
.
lstm
=
Dynamic
GRU
(
self
.
encoder_features
,
hidden_size
=
128
,
num_layers
=
3
,
dropout
=
0.5
,
bidirectional
=
True
)
self
.
dense_head
=
torch
.
nn
.
Sequential
(
self
.
dense_head
=
torch
.
nn
.
Sequential
(
torch
.
nn
.
Dropout
(
p
=
0.5
),
torch
.
nn
.
Dropout
(
p
=
0.5
),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment