Skip to content

Commit

Permalink
✅ add test for internal/errors/tensorflow
Browse files Browse the repository at this point in the history
Signed-off-by: vankichi <kyukawa315@gmail.com>
  • Loading branch information
vankichi authored and kevindiu committed Feb 8, 2021
1 parent f6ec4a2 commit 8e1752d
Show file tree
Hide file tree
Showing 2 changed files with 642 additions and 0 deletions.
7 changes: 7 additions & 0 deletions internal/errors/tensorflow.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,22 @@
package errors

var (
// ErrFailedToCastTF represents a function to generate an error that failed to something cast to tensorflow.
ErrFailedToCastTF = func(v interface{}) error {
return Errorf("failed to cast tensorflow result %+v", v)
}

// ErrInputLength represents a function to generate an error that input length is not equal to required.
ErrInputLength = func(i int, f int) error {
return Errorf("inputs length %d does not match feeds length %d", i, f)
}

// ErrNilTensorTF represents a function to generate an error that nil tensorflow tensor.
ErrNilTensorTF = func(v interface{}) error {
return Errorf("nil tensorflow tensor %+v", v)
}

// ErrNilTensorValueTF represents a function to generate an error that nil tensorflow value,
ErrNilTensorValueTF = func(v interface{}) error {
return Errorf("nil tensorflow tensor value %+v", v)
}
Expand Down
Loading

0 comments on commit 8e1752d

Please sign in to comment.