Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mhc_rank
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Patrick Skillman-Lawrence
mhc_rank
Commits
8796764c
Commit
8796764c
authored
9 years ago
by
Alex Rubinsteyn
Browse files
Options
Downloads
Patches
Plain Diff
upgrading keras, trying to figure out why output changes
parent
7d889baf
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
mhcflurry/feedforward.py
+2
-0
2 additions, 0 deletions
mhcflurry/feedforward.py
mhcflurry/mhc1_binding_predictor.py
+3
-0
3 additions, 0 deletions
mhcflurry/mhc1_binding_predictor.py
with
5 additions
and
0 deletions
mhcflurry/feedforward.py
+
2
−
0
View file @
8796764c
...
...
@@ -81,11 +81,13 @@ def make_network(
model
.
add
(
Embedding
(
input_dim
=
embedding_input_dim
,
output_dim
=
embedding_output_dim
,
input_length
=
input_size
,
init
=
init
))
model
.
add
(
Flatten
())
input_size
=
input_size
*
embedding_output_dim
layer_sizes
=
(
input_size
,)
+
tuple
(
layer_sizes
)
for
i
,
dim
in
enumerate
(
layer_sizes
):
if
i
==
0
:
# input is only conceptually a layer of the network,
...
...
This diff is collapsed.
Click to expand it.
mhcflurry/mhc1_binding_predictor.py
+
3
−
0
View file @
8796764c
...
...
@@ -59,6 +59,7 @@ class Mhc1BindingPredictor(object):
else
:
filename
=
self
.
allele
+
"
.hdf
"
path
=
join
(
model_directory
,
filename
)
print
(
"
HDF path: %s
"
%
path
)
if
not
exists
(
path
):
raise
ValueError
(
"
Unsupported allele: %s
"
%
(
original_allele_name
,))
...
...
@@ -71,7 +72,9 @@ class Mhc1BindingPredictor(object):
init
=
INITIALIZATION_METHOD
,
dropout_probability
=
DROPOUT_PROBABILITY
,
compile_for_training
=
True
)
print
(
"
before
"
,
len
(
self
.
model
.
get_weights
()),
self
.
model
.
get_weights
()[
0
][
0
])
self
.
model
.
load_weights
(
path
)
print
(
"
after
"
,
len
(
self
.
model
.
get_weights
()),
self
.
model
.
get_weights
()[
0
][
0
])
_allele_model_cache
[
self
.
allele
]
=
self
.
model
def
__repr__
(
self
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment