jordenhill / birdbrain Goto Github PK
View Code? Open in Web Editor NEWA neural network framework written in Swift.
License: MIT License
A neural network framework written in Swift.
License: MIT License
Jorden I'm curious if you've ever used the RNN to do any actual predictions or classification. Your readme says that none of these are usable but I'm thinking that perhaps the readme is not updated. Have you successfully used the RNN in birdbrain for some task?
Hello,
I'm very much interested in using this framework. However, it needs to be ported to swift 4 (or swift 3.2). I tried doing that, but I'm facing some issues. Are you planning to convert it?
Thnx!
Hi :) First of all great work! I am also using swift and I am interested in implementing an RNN. I found Swift-AI and I thought that instead of duplicating efforts you could submit your library for inclusion at Swift-AI? Would be nice to get the swift machine learning libraries consolidated..
I think your code would make an especially useful contribution because it uses metal/gpu.
Just a thought. Keep up the good work!
Hello :)
I opened up the birdbrain project but it fails to build. The error message is ld: framework not found Birdbrain. I can't see why the linked would need to find the Birdbrain framework in order to link the framework to begin with. It's like trying to link with itself ...
I'm on Xcode 7.2.1
Here is the detailed error message:
Ld /Users/jubei/Library/Developer/Xcode/DerivedData/Birdbrain-ccpqedrlqhtglybhribchsdjwtsj/Build/Products/Debug/Birdbrain.framework/Versions/A/Birdbrain normal x86_64
cd /Users/jubei/coding/Birdbrain
export MACOSX_DEPLOYMENT_TARGET=10.11
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -dynamiclib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -L/Users/jubei/Library/Developer/Xcode/DerivedData/Birdbrain-ccpqedrlqhtglybhribchsdjwtsj/Build/Products/Debug -F/Users/jubei/Library/Developer/Xcode/DerivedData/Birdbrain-ccpqedrlqhtglybhribchsdjwtsj/Build/Products/Debug -filelist /Users/jubei/Library/Developer/Xcode/DerivedData/Birdbrain-ccpqedrlqhtglybhribchsdjwtsj/Build/Intermediates/Birdbrain.build/Debug/Birdbrain.build/Objects-normal/x86_64/Birdbrain.LinkFileList -install_name @rpath/Birdbrain.framework/Versions/A/Birdbrain -Xlinker -rpath -Xlinker @executable_path/../Frameworks -Xlinker -rpath -Xlinker @loader_path/Frameworks -mmacosx-version-min=10.11 -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx -Xlinker -add_ast_path -Xlinker /Users/jubei/Library/Developer/Xcode/DerivedData/Birdbrain-ccpqedrlqhtglybhribchsdjwtsj/Build/Intermediates/Birdbrain.build/Debug/Birdbrain.build/Objects-normal/x86_64/Birdbrain.swiftmodule -framework Metal -framework Accelerate -framework Birdbrain -single_module -compatibility_version 1 -current_version 1 -Xlinker -dependency_info -Xlinker /Users/jubei/Library/Developer/Xcode/DerivedData/Birdbrain-ccpqedrlqhtglybhribchsdjwtsj/Build/Intermediates/Birdbrain.build/Debug/Birdbrain.build/Objects-normal/x86_64/Birdbrain_dependency_info.dat -o /Users/jubei/Library/Developer/Xcode/DerivedData/Birdbrain-ccpqedrlqhtglybhribchsdjwtsj/Build/Products/Debug/Birdbrain.framework/Versions/A/Birdbrain
ld: framework not found Birdbrain
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Jorden I tried to train your rnn with a very simple method:
Target: 1 for random positive gaussian numbers
Target: 0 for random negative gaussian numbers
Loss seems to become not-a-number after a few training runs. If you're interested in getting to the bottom of this then please run the following playground alongside birdbrain:
var rnn = RecurrentNeuralNetwork(inputDim: 2,hiddenDim: 1,useMetal: false,activationFunction:"tangent")
for x in 0...1000 {
//generate a random positive float
let pos = abs(rand_gauss())
//generate a random negative float
let neg = abs(rand_gauss())*(-1)
//train the RNN
rnn.backprop([[pos]], target: [Array(count: 1, repeatedValue: 1)], learningRate: 0.001)
rnn.backprop([[neg]], target: [Array(count: 1, repeatedValue: 0)], learningRate: 0.001)
var loss = rnn.calculateLoss([[abs(rand_gauss())]], target: [[1]], numExamples: 1)
Swift.print(loss)
}
//attempt at basic prediction
let pos = abs(rand_gauss())
let neg = abs(rand_gauss())*(-1)
Swift.print(rnn.predict([[pos]]))
Swift.print(rnn.predict([[neg]]))
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.