-
Notifications
You must be signed in to change notification settings - Fork 0
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
Create topic based on hash #10
Conversation
d7a9f73
to
0bdac00
Compare
@@ -179,7 +187,7 @@ const predict = async () => { | |||
const predicted = tf.tidy(() => { | |||
const img = capture(webcamera); | |||
const activation = mobilenet.predict(img); | |||
const predictions = model.predict(activation) as tf.Tensor<tf.Rank>; |
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.
僕の環境だとこのキャストが無いとエラーになるんですが,今村さんの環境ではイケてます?
[ts]
Property 'as1D' does not exist on type 'Tensor<Rank> | Tensor<Rank>[]'.
Property 'as1D' does not exist on type 'Tensor<Rank>[]'.
any
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.
おっと。すみません自分の環境でも tsc
ではエラーでした。。
tslint の設定見直します!
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.
palantir/tslint#2736 に上がっているバグで、 no-unused-variable
を使っていると他の rule (今回は no-unnecessary-type-assertion
)が壊れる場合があり、それにはまっていたようなので、 no-unused-variable
を無効にし、代わりに tsconfig.json
の noUnusedLocals
と noUnusedParameters
を使うようにしました。
また、 CI のチェックで tsc
が通ることも確認するようにしました。
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.
LGTM
URL の hash に基づいて制御対象のロボット、車輪を決めるようにしました 25f496d
ついでに、 tslint の導入 33f707f と CI で travis を使う 0bdac00 のもやってみました