Skip to content

Commit

Permalink
fix build and specs
Browse files Browse the repository at this point in the history
  • Loading branch information
stakach committed May 22, 2024
1 parent fd46b4d commit ea8529f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions build_tensorflowlite.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ fi

cd ..

# rm -rf ./tensorflow
# rm -rf ./tflite_build
rm -rf ./tensorflow
rm -rf ./tflite_build

echo "--"
echo "Done"
4 changes: 2 additions & 2 deletions spec/tensorflow_lite_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -188,15 +188,15 @@ module TensorflowLite
end

it "works with quantized models" do
model_path = Path.new File.join(__DIR__, "./test_data/xor_model_quantized.tflite")
quant_path = Path.new File.join(__DIR__, "./test_data/xor_model_quantized.tflite")
quantized_test = {
{input: {-128_i8, -128_i8}, result: 0},
{input: {127_i8, -128_i8}, result: 1},
{input: {-128_i8, 127_i8}, result: 1},
{input: {127_i8, 127_i8}, result: 0},
}

client = TensorflowLite::Client.new(model_path)
client = TensorflowLite::Client.new(quant_path)

quantized_test.each do |test|
inputs = test[:input]
Expand Down

0 comments on commit ea8529f

Please sign in to comment.