Skip to content

Commit

Permalink
Update inference-tensorflow.R
Browse files Browse the repository at this point in the history
Alteração sugerida em Irrationone#92 (comment) para corrigir erro de execução
  • Loading branch information
GabrielPlaza95 authored Mar 14, 2022
1 parent be66325 commit 5f56825
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/inference-tensorflow.R
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ inference_tensorflow <- function(Y,

Q = -tf$einsum('nc,cn->', gamma_fixed, p_y_on_c_unorm)

p_y_on_c_norm <- tf$reshape(tf$reduce_logsumexp(p_y_on_c_unorm, 0L), shape(1,-1))
p_y_on_c_norm <- tf$reshape(tf$reduce_logsumexp(p_y_on_c_unorm, 0L), as_tensor(shape(1,NULL)))

gamma <- tf$transpose(tf$exp(p_y_on_c_unorm - p_y_on_c_norm))

Expand Down

0 comments on commit 5f56825

Please sign in to comment.