From 57e424452110676f7dc05fc30cfd08be5dc8ea23 Mon Sep 17 00:00:00 2001 From: Chewxy Date: Tue, 21 Jul 2020 14:07:25 +1000 Subject: [PATCH] Updated the Zeroes() weight ini t function (#422) --- weights.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/weights.go b/weights.go index 720a930d..f00b2d19 100644 --- a/weights.go +++ b/weights.go @@ -2,6 +2,7 @@ package gorgonia import ( "math" + "reflect" "time" rng "github.com/leesper/go_rng" @@ -30,8 +31,7 @@ func Zeroes() InitWFn { case tensor.Int: return make([]int, size) default: - err := errors.Errorf(nyiTypeFail, "Zeroes", dt) - panic(err) + return reflect.MakeSlice(reflect.SliceOf(dt.Type), size, size).Interface() } } return f