Skip to content

Commit

Permalink
fix(client): initializers need to match
Browse files Browse the repository at this point in the history
reorder so it's more obvious
  • Loading branch information
stakach committed May 26, 2023
1 parent e58745c commit 74e3fe5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion shard.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: tensorflow_lite
version: 1.6.3
version: 1.6.4

development_dependencies:
ameba:
Expand Down
10 changes: 5 additions & 5 deletions src/tensorflow_lite/client.cr
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ class TensorflowLite::Client
include Indexable(Tensor)

# Configures the tensorflow interpreter with the options provided
def self.new(model : URI | Bytes | Path | Model | String, delegate : Delegate? = nil, threads : Int? = nil, labels : URI | Hash(Int32, String)? = nil)
Client.new(model, delegate, threads, labels) { |error_message| Log.error { error_message } }
end

# :ditto:
def initialize(model : URI | Bytes | Path | Model | String, delegate : Delegate? = nil, threads : Int? = nil, labels : URI | Hash(Int32, String)? = nil, &on_error : String -> Nil)
@labels_fetched = !!@labels
@model = case model
Expand Down Expand Up @@ -55,11 +60,6 @@ class TensorflowLite::Client
@interpreter = Interpreter.new(@model, @options)
end

# :ditto:
def self.new(model : Bytes | Path | Model | String, delegate : Delegate? = nil, threads : Int? = nil)
Client.new(model, delegate, threads) { |error_message| Log.warn { error_message } }
end

getter model : Model
getter model_path : Path? = nil
getter options : InterpreterOptions
Expand Down

0 comments on commit 74e3fe5

Please sign in to comment.