Skip to content

Conversation

@nskins
Copy link
Contributor

@nskins nskins commented Dec 30, 2022

If one runs the command elixir multi_input_example.exs, the following error occurs (the same error also occurs for the multi_output_example.exs file):

** (FunctionClauseError) no function clause matching in Axon.input/2    
    
    The following arguments were given to Axon.input/2:
    
        # 1
        "x1"
    
        # 2
        [shape: {nil, 1}]
    
    Attempted function clauses (showing 1 out of 1):
    
        def input(input_shape, name) when is_tuple(input_shape) and is_binary(name)
    
    (axon 0.1.0) lib/axon.ex:411: Axon.input/2
    multi_input_example.exs:11: XOR.build_model/2
    multi_input_example.exs:34: XOR.run/0

I determined that this was because the parameters for Axon.input/2 have changed since v0.1.0. I figured that the best resolution would be to update the dependencies in the examples to keep things up-to-date. This was the only change required. As you can see, I left :exla alone in the multi_output_example.exs script since it is commented out. Let me know if anything should change there.

I'd be happy to to take a look at the rest of the examples if you are satisfied with this PR. I think the other examples are still using v0.1.0; however, I have not yet run any of those scripts to determine if errors are occurring.

@seanmor5 seanmor5 merged commit 9d788f5 into elixir-nx:main Jan 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants