Skip to content

Commit d836dba

Browse files
author
hhsecond
committed
js client
1 parent 2feda47 commit d836dba

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

js_client/tensorflow_imagenet.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ async function load_model() {
1919
const script = fs.readFileSync(script_path, {'flag': 'r'})
2020

2121
redis.call('AI.MODELSET', 'imagenet_model', 'TF', 'CPU',
22-
'INPUTS', 'images', 'OUTPUTS', 'output', model)
23-
redis.call('AI.SCRIPTSET', 'imagenet_script', 'CPU', script)
22+
'INPUTS', 'images', 'OUTPUTS', 'output', "BLOB", model)
23+
redis.call('AI.SCRIPTSET', 'imagenet_script', 'CPU', "SOURCE", script)
2424
}
2525

2626
async function run(filename) {

js_client/tensorflow_mobilenet.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ function run(filenames) {
4242
* https://github.com/luin/ioredis#pipelining
4343
*/
4444
redis.pipeline()
45-
.call('AI.MODELSET', 'mobilenet', 'TF', 'CPU', 'INPUTS', config.inputNode, 'OUTPUTS', config.outputNode, model)
45+
.call('AI.MODELSET', 'mobilenet', 'TF', 'CPU', 'INPUTS', config.inputNode, 'OUTPUTS', "BLOB", config.outputNode, model)
4646
.call('AI.TENSORSET', 'input_' + key, 'FLOAT', 1, config.imageWidth, config.imageHeight, 3, 'BLOB', buffer)
4747
/**
4848
* Important note: we're using the same input/output keys here...why? Well, in this example

js_client/torch_charrnn.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const batch_size = 1
2020

2121
async function load_model() {
2222
const model = fs.readFileSync(model_path, {'flag': 'r'})
23-
redis.call('AI.MODELSET', 'char_rnn', 'TORCH', 'CPU', model)
23+
redis.call('AI.MODELSET', 'char_rnn', 'TORCH', 'CPU', "BLOB", model)
2424
}
2525

2626
async function run(prime) {

js_client/torch_imagenet.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ async function load_model() {
1818
const model = fs.readFileSync(model_path, {'flag': 'r'})
1919
const script = fs.readFileSync(script_path, {'flag': 'r'})
2020

21-
redis.call('AI.MODELSET', 'imagenet_model', 'TORCH', 'CPU', model)
22-
redis.call('AI.SCRIPTSET', 'imagenet_script', 'CPU', script)
21+
redis.call('AI.MODELSET', 'imagenet_model', 'TORCH', 'CPU', "BLOB", model)
22+
redis.call('AI.SCRIPTSET', 'imagenet_script', 'CPU', "SOURCE", script)
2323
}
2424

2525
async function run(filename) {

0 commit comments

Comments
 (0)