From 5f56825c048615831a711eebf6bb089dfee1aea4 Mon Sep 17 00:00:00 2001 From: GabrielPlaza95 <12886990+GabrielPlaza95@users.noreply.github.com> Date: Mon, 14 Mar 2022 19:13:22 -0300 Subject: [PATCH] Update inference-tensorflow.R MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Alteração sugerida em https://github.com/Irrationone/cellassign/issues/92#issuecomment-1000980203 para corrigir erro de execução --- R/inference-tensorflow.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/inference-tensorflow.R b/R/inference-tensorflow.R index c93732d..369956e 100644 --- a/R/inference-tensorflow.R +++ b/R/inference-tensorflow.R @@ -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))