From 0cce5bbd9e5ba3173fad318ff269feaab449e0c2 Mon Sep 17 00:00:00 2001 From: Antoni Przybylik Date: Sun, 17 Nov 2024 18:36:17 +0800 Subject: [PATCH] Change visibility of `nn::Path::add` method to public. There is no reason for this method to have visibility limited to crate. --- src/nn/var_store.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nn/var_store.rs b/src/nn/var_store.rs index 5ee21403..e78c83a0 100644 --- a/src/nn/var_store.rs +++ b/src/nn/var_store.rs @@ -496,7 +496,7 @@ impl<'a> Path<'a> { self.set_float_kind(Kind::Double); } - pub(crate) fn add(&self, name: &str, tensor: Tensor, trainable: bool) -> Tensor { + pub fn add(&self, name: &str, tensor: Tensor, trainable: bool) -> Tensor { let path = self.path(name); let mut variables = self.var_store.variables_.lock().unwrap(); let path = if variables.named_variables.contains_key(&path) {