Change BASES constant to a local variable
This commit is contained in:
parent
ad49e598db
commit
5ac81c049f
|
@ -1,10 +1,8 @@
|
||||||
from tensorflow.keras import Model, Sequential, layers
|
from tensorflow.keras import Model, Sequential, layers
|
||||||
from tensorflow.keras.regularizers import l2
|
from tensorflow.keras.regularizers import l2
|
||||||
|
|
||||||
from preprocessing import BASES
|
|
||||||
|
|
||||||
|
def build_model(hyper_parameters, bases="ACGT") -> Model:
|
||||||
def build_model(hyper_parameters) -> Model:
|
|
||||||
"""
|
"""
|
||||||
Builds the CNN model
|
Builds the CNN model
|
||||||
"""
|
"""
|
||||||
|
@ -41,6 +39,6 @@ def build_model(hyper_parameters) -> Model:
|
||||||
),
|
),
|
||||||
layers.Dropout(rate=0.3),
|
layers.Dropout(rate=0.3),
|
||||||
# Output layer with softmax activation
|
# Output layer with softmax activation
|
||||||
layers.Dense(units=len(BASES), activation="softmax"),
|
layers.Dense(units=len(bases), activation="softmax"),
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
|
@ -4,8 +4,6 @@ from numpy.random import random
|
||||||
from tensorflow.io import TFRecordWriter
|
from tensorflow.io import TFRecordWriter
|
||||||
from tensorflow.train import BytesList, Example, Feature, Features, FloatList
|
from tensorflow.train import BytesList, Example, Feature, Features, FloatList
|
||||||
|
|
||||||
BASES = "ACGT"
|
|
||||||
|
|
||||||
|
|
||||||
def generate_example(sequence, weight_matrix):
|
def generate_example(sequence, weight_matrix):
|
||||||
schema = {
|
schema = {
|
||||||
|
|
Loading…
Reference in New Issue