-
Notifications
You must be signed in to change notification settings - Fork 76
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
fix tensorflow.go, option.go #261
Conversation
Best reviewed: commit by commit
Optimal code review plan
|
@@ -26,7 +26,9 @@ type SessionOptions = tf.SessionOptions | |||
type Operation = tf.Operation | |||
|
|||
type TF interface { | |||
GetVector(feeds []Feed, fetches []Fetch, targets ...*Operation) (values [][][]float64, err error) | |||
GetVector(feeds []Feed, fetch Fetch, targets ...*Operation) ([]float64, error) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GetVector(feeds []Feed, fetch Fetch, targets ...*Operation) ([]float64, error) | |
GetVector(seeds ...[]byte) ([]float64, error) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
for _, result := range results { | ||
value, ok := result.Value().([][]float64) | ||
switch t.ndim { | ||
case 2: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[golangci] reported by reviewdog 🐶
mnd: Magic number: 2, in detected (gomnd)
} else { | ||
return nil, errors.ErrFailedToCastTF(tensors[0].Value()) | ||
} | ||
case 3: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[golangci] reported by reviewdog 🐶
mnd: Magic number: 3, in detected (gomnd)
} | ||
const ( | ||
TWO_DIM int8 = 2 | ||
THREE_DIM int8 = 3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In golang const value we shouldn't use snake case please use camel case, and I recommend below
THREE_DIM int8 = 3 | |
NoDim uint8 = iota | |
OneDim | |
TwoDim | |
ThreeDim |
Signed-off-by: datelier <57349093+datelier@users.noreply.github.com>
Signed-off-by: datelier <57349093+datelier@users.noreply.github.com>
Signed-off-by: datelier <57349093+datelier@users.noreply.github.com>
Signed-off-by: datelier <57349093+datelier@users.noreply.github.com>
Signed-off-by: datelier <57349093+datelier@users.noreply.github.com>
/rebase |
[REBASE] Rebase triggered by kpango for branch: feature/tensorflow |
[REBASE] Failed to rebase. |
6603044
to
4eeda50
Compare
Signed-off-by: datelier 57349093+datelier@users.noreply.github.com
Description:
Related Issue:
How Has This Been Tested?:
Environment:
Types of changes:
Changes to Core Features:
Checklist: