mirror of
https://github.com/lxsang/antd-lua-plugin
synced 2024-12-29 10:48:21 +01:00
15 lines
314 B
Lua
Executable File
15 lines
314 B
Lua
Executable File
#! /usr/bin/env lua
|
|
|
|
require("lfann")
|
|
|
|
-- Load the network from a file
|
|
local net = fann.Net.create_from_file("xor.net")
|
|
|
|
-- Test using command line args
|
|
local input = {arg[1] and tonumber(arg[1]) or 1, arg[1] and tonumber(arg[2]) or 0}
|
|
local output = net:run(input)
|
|
|
|
for i, j in ipairs(output) do
|
|
print(j)
|
|
end
|