Skip to content

Commit

Permalink
Updated the Zeroes() weight ini t function (#422)
Browse files Browse the repository at this point in the history
  • Loading branch information
chewxy committed Jul 21, 2020
1 parent 5cd5dc0 commit 57e4244
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions weights.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package gorgonia

import (
"math"
"reflect"
"time"

rng "github.com/leesper/go_rng"
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 57e4244

Please sign in to comment.