Skip to content

Commit

Permalink
Beta now initialized based on genes
Browse files Browse the repository at this point in the history
  • Loading branch information
kieranrcampbell committed Apr 6, 2020
1 parent c38304c commit 8504593
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions R/inference-tensorflow.R
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,17 @@ inference_tensorflow <- function(Y,
tf$constant(Inf, dtype = tf$float64))
})

beta <- tf$Variable(tf$random_normal(shape(G,P),
mean = 0,
stddev = 1,
seed = random_seed,
dtype = tf$float64),
# beta <- tf$Variable(tf$random_normal(shape(G,P),
# mean = 0,
# stddev = 1,
# seed = random_seed,
# dtype = tf$float64),
# dtype = tf$float64)

beta_0_init <- scale(colMeans(Y))
beta_init <- cbind(beta_0_init,
matrix(0, nrow = G, ncol = P-1))
beta <- tf$Variable(tf$constant(beta_init, dtype = tf$float64),
dtype = tf$float64)

theta_logit <- tf$Variable(tf$random_normal(shape(C),
Expand Down

0 comments on commit 8504593

Please sign in to comment.