Would a Amazon EC2 T2 instance be suitable to run TensorFlow Mobile or TensorFlow Lite? - swift

I'm learning about Amazon web services for mobile and I do have a project in mind. I don't think I plan on creating machine learning data models from scratch however I did notice there is a AI/machine learning service within AWS. I plan on using CoreML for iOS. I'm currently learning from the free tier and I wonder how much will truly be offered in this option. I'd like to know if a T2 instance is suitable enough to work with TensorFlow Mobile or TensorFlow Lite?

If you are using TensorFlow Mobile or TensorFlow Lite, still need to know what kind of process you are going to perform.
If you are going to build a model using T2 instances then I recommend going with P2 instances.
If you are going to run a mode using T2 instances then you can try on t2.2xlarge
But it won't be smooth and that much accurate as compare to GPU performance
But if your use-case is not that much deep n critical then this will definitely help you with performance and cost saving

Related

why I enabled Metal API but my Coreml custom layer still run on CPU

I am really new to Coreml and Metal.
Now I am working on a project testing performance of Core Ml model. I implemented a CNN model based on tensorflow and convert this model to .mlmodel using tf-coreml tool.
But in my CNN model, it has an op named 'equal', which Coreml does not support. It converted into a custom layer of .mlmodel my .mlmodel file screen shot
Then I followed Hollemans amazing blog http://machinethink.net/blog/coreml-custom-layers/ to implement this custom layer on both CPU and GPU. My Cpu version works good, but when I implemented this op on GPU it cannot activate "encode function". I followed all steps in Hollemans's Blog creating the Metal compute kernels and the rest. But when I run my project, it always run on CPU. It seemed never get into Encode function.only run on evaluate function
I searched a lot on google but did not find an ideal answer, that really made me frustrated. If anyone has any hints, I will really appreciate. Thanks in advance.
When you ask your model for prediction, you can specify options like running on CPU only. One possible reason why your model isn't running on GPU might be that you have something like
let options = MLPredictionOptions()
options.usesCPUOnly = true
in your code and you pass options to the prediction method. Put the usesCPUOnly property to false to allow the model to run on GPU. As it isn't mentioned in the Hollemans' blog (which is really great) that you can choose to run the model on CPU or GPU, I guess it could be one reason why your model keeps running on CPU.

Google Cloud ML for recommendations

I need to make a music recommendation system for a music platform using machine learning.
The platform has:
40+ million songs
4.5+ million albums
2.5+ million artists
1648 genres
600k users
The relations between the above objects are:
1-song - many-genres
1-song - many-artists
1-song - 1-album
1-album - many-songs
1-album - many-artists
1-artist - many-albums
1-artist - many-songs
And i got the users activity(listened songs) and favorites(song, artist, albums)
Amazon ML doesn't seem to support collaborative filtering, and now i'm looking through Google Cloud ML.
One problem is the size of the data. Basically every song has 1+ genres and 1+ artists which are categorical attributes. Amazon ML support ~100 categories(at a glance i have 2.5m if the artists are regarded as categories). Looking through google's machine learning pages i found only simple examples so i don't really know where to start.
Being a beginner in the machine learning landscape i wonder if the problem is the way i see(try to solve) these recommendations, or even if ML is the way to go.
Google CloudML Engine is a hosted solution for running TensorFlow programs. TensorFlow is a machine learning framework, designed with scale in mind. So as long as you can write a Distributed TensorFlow program, you can run it on CloudML Engine, which should allow you to scale quite well. (I will note, there is a learning curve both to TensorFlow and Machine Learning in general, but you'll definitely want an ML-based solution for recommendations).
A quick Google search reveals multiple helpful materials for building a recommendation system using TensorFlow (caveat: I haven't vetted any of these):
This coursera class on machine learning.
A github repository of various recommendation algorithms in TensorFlow
A meetup in Singapore on the topic (comments have links to videos, etc.)
A YouTube video
Another YouTube video

Play Framework with Spark MLib vs PredictionIO

Good morning,
currently I'm exploring my options for building an internal platform for the company I work for. Our team is responsible for the company's data warehouse and reporting.
As we evolve, we'll be developing an intranet to answer some of the company's necessities and, for some time now, I'm considering scala (and PlayFramework) as the way to go.
This will also envolve a lot of machine learning to cluster clients, predict sales evolution, and so on. This is when I've started to think in Spark ML and came across PredictionIO.
As we are shifting our skills towards data science, what will benefit and teach us/company most:
build everything on top of Play and Spark and have both the plataform and machine learning on the same project
using Play and PredictionIO where most of the stuff is already prepared
I'm not trying to open a question opinion based, rather then, learn from your experience / architectures / solutions.
Thank you
Both are good options: 1. use PredictionIO if you are new to ML, easy to start but it will limit you in a long run, 2. use spark if you have confidence in your data science and data engineering team, spark has excellent and easy to use api along with extensive ML library, saying that in order to put things into production, you will require some distributed spark knowledge - experience and it is tricky at times to make it efficient and reliable.
Here are options:
spark databricks cloud expensive but easy to use spark, no data engineering
PredictionIO if you certain that their ML can solve all your business cases
spark in google dataproc, easy managed cluster for 60% less than aws, still some engineering required
In summary: PredictionIO for a quick fix, and spark for long term data - science / engineering development. You can start with databricks to minimise expertise overheads and move to dataproc as you go along to minimise costs
PredictionIO uses Spark's MLLib for the majority of their engine templates.
I'm not sure why you're separating the two?
PredictionIO is as flexible as Spark is, and can alternatively use other libraries such as deeplearning4j & H2O to name a few.

Setting up a distributed computing grid on local network using .NET

In our firm we run complex simulations using our own software developed in .NET. These simulations are well-suited to parallel computation and we currently make much use of the various multi-threading features native to .NET. Even so, simulations often take hours or days.
We'd like to explore the potential of distributing computation over our local network of high-performance (24 core) workstations to access more CPU power. However we have no experience in this area.
Searching on Google reveals a few MPI-based options such as Pure MPI, MPI.NET, plus some commercial software such as Frontier.
Which solution should we consider for something that is ideally well-suited to a .NET environment and is relatively easy to set up?
Thanks!
Multithreading != grid computing, so you will need to rewrite some parts of your application regardless of what you will choose in the end.
I don’t know your network infrastructure but it sounded to me, like you would want to use normal desktop workstations to run distribute the code. I wouldn’t use MPI for that. MPI was rather developed for clusters and supercomputers where the network supports high bandwidth and low latency. Those aren’t the properties of a traditional office network (unless I understood something wrong).
The next thing you have to deal with is the fact that users shouldn’t turn off their machines if computations are performed on them. No grid computing platform (including MPI) deals with these kind of issues, as it is usually running on server hardware which has little failures and are running 24/7.
I don’t think there is a simple and inexpensive solution to this. You could have a service running on each machine which could execute code from DLLs with predefined parameters and send responses. Those assemblies could be downloadable from some windowsshare. But you want to have really huge peaces of work to be distributed like this. You wouldn’t get almost any improvements if the application runs only for a minute or less.
In the end you’d need also a service to find those services which are online or not, some kind of in memory DB where every service could write the IP address and that it’s online so that the clients would know to whom they can distribute the work. This could be done using RavenDB (as you said you are working with .Net), Redis or an application which was actually written for these kind of problems, Zookeeper.

What application can I build to stress-test real-time communication in a multi-user environment?

As a main project in 5th semester of CS degree I am doing a research on technologies for realizing real-time server2client communication in a multi-user environment. The deciding factors are:
1. Performance
2. Scalability
3. Ease of implementation
4. Portability
5. Architectural flexibility
6. Community support
7. Licensing fees
Now, I could build a chat application with each technology, which I analyze, and get it over with. The problem is that I don't think that such an app would even remotely reach the boundaries of what a certain technology can do.
So my question is: what kind of prototype application could I build to make a good test for Performance and Scalability?
If it's any help, the technologies which I am going to test are: SignalR, Pusher, Pubnub, LightStreamer.
Thank you in advance!
Not a "popular" answer, although:
My experience shows me that each and every case is special.
There is not prototype application for that, except for generic tools like ab (generic to some degree, uh).
For each test you simply have to get the right "ingredients".