Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add test for internal/errors/tensorflow #982

Merged
merged 4 commits into from
Feb 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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