• My Top 9 Favorite Python Deep Learning Libraries

    deep_learning_lib_network
    So you’re interested in deep learning and Convolutional Neural Networks. But where do you start? Which library do you use? There are just so many!
    Inside this blog post, I detail 9 of my favorite Python deep learning libraries.
    This list is by no means exhaustive, it’s simply a list of libraries that I’ve used in my computer vision career and found particular useful at one time or another.
    Some of these libraries I use more than others — specifically, Kerasmxnet, and sklearn-theano.
    Others, I use indirectly, such as Theano and TensorFlow (which libraries like Kerasdeepy, and Blocks build upon).
    And even others, I use only for very specific tasks (such as nolearn and their Deep Belief Network implementation).
    The goal of this blog post is to introduce you to these libraries. I encourage you to read up on each them individually to determine which one will work best for you in your particular situation.

    My Top 9 Favorite Python Deep Learning Libraries

    Again, I want to reiterate that this list is by no means exhaustive. Furthermore, since I am a computer vision researcher and actively work in the field, many of these libraries have a strong focus on Convolutional Neural Networks (CNNs).
    I’ve organized this list of deep learning libraries into three parts.
    The first part details popular libraries that you may already be familiar with. For each of these libraries, I provide a very general, high-level overview. I then detail some of my likes and dislikes about each library, along with a few appropriate use cases.
    The second part dives into my personal favorite deep learning libraries that I use heavily on a regular basis (HINT: Keras, mxnet, and sklearn-theano).
    Finally, I provide a “bonus” section for libraries that I have (1) not used in a long time, but still think you may find useful or (2) libraries that I haven’t tried yet, but look interesting.
    Let’s go ahead and dive in!

    For starters:

    1. Caffe

    It’s pretty much impossible to mention “deep learning libraries” without bringing up Caffe. In fact, since you’re on this page right now reading up on deep learning libraries, I’m willing to bet that you’ve already heard of Caffe.
    So, what is Caffe exactly?
    Caffe is a deep learning framework developed by the Berkeley Vision and Learning Center (BVLC). It’s modular. Extremely fast. And it’s used by academics and industry in start-of-the-art applications.
    In fact, if you were to go through the most recent deep learning publications (that also provide source code), you’ll more than likely find Caffe models on their associated GitHub repositories.
    While Caffe itself isn’t a Python library, it does provide bindings into the Python programming language. We typically use these bindings when actually deploying our network in the wild.
    The reason I’ve included Caffe in this list is because it’s used nearly everywhere. You define your model architecture and solver methods in a plaintext, JSON-like file called .prototxt  configuration files. The Caffe binaries take these .prototxt  files and train your network. After Caffe is done training, you can take your network and classify new images via Caffe binaries, or better yet, through the Python or MATLAB APIs.
    While I love Caffe for its performance (it can process 60 million images per day on a K40 GPU), I don’t like it as much as Keras or mxnet.
    The main reason is that constructing an architecture inside the .prototxt  files can become quite tedious and tiresome. And more to the point, tuning hyperparameters with Caffe can not be (easily) done programmaticallyBecause of these two reasons, I tend to lean towards libraries that allow me to implement the end-to-end network (including cross-validation and hyperparameter tuning) in a Python-based API.

    2. Theano

    Let me start by saying that Theano is beautiful. Without Theano, we wouldn’t have anywhere near the amount of deep learning libraries (specifically in Python) that we do today. In the same way that without NumPy, we couldn’t have SciPy, scikit-learn, and scikit-image, the same can be said about Theano and higher-level abstractions of deep learning.
    At the very core, Theano is a Python library used to define, optimize, and evaluate mathematical expressions involving multi-dimensional arrays. Theano accomplishes this via tight integration with NumPy and transparent use of the GPU.
    While you can build deep learning networks in Theano, I tend to think of Theano as the building blocks for neural networks, in the same way that NumPy serves as the building blocks for scientific computing. In fact, most of the libraries I mention in this blog post wrap around Theano to make it more convenient and accessible.
    Don’t get me wrong, I love Theano — I just don’t like writing code in Theano.
    While not a perfect comparison, building a Convolutional Neural Network in Theano is like writing a custom Support Vector Machine (SVM) in native Python with only a sprinkle of NumPy.
    Can you do it?
    Sure, absolutely.
    Is it worth your time and effort?
    Eh, maybe. It depends on how low-level you want to go/your application requires.
    Personally, I’d rather use a library like Keras that wraps Theano into a more user-friendly API, in the same way that scikit-learn makes it easier to work with machine learning algorithms.

    3. TensorFlow

    Similar to Theano, TensorFlow is an open source library for numerical computation using data flow graphs (which is all that a Neural Network really is). Originally developed by the researchers on the Google Brain Team within Google’s Machine Intelligence research organization, the library has since been open sourced and made available to the general public.
    A primary benefit of TensorFlow (as compared to Theano) is distributed computing, particularly among multiple-GPUs (although this is something Theano is working on).
    Other than swapping out the Keras backend to use TensorFlow (rather than Theano), I don’t have much experience with the TensorFlow library. Over the next few months, I expect this to change, however.

    4. Lasagne

    Lasagne is a lightweight library used to construct and train networks in Theano. The key term here is lightweight — it is not meant to be a heavy wrapper around Theano like Keras is. While this leads to your code being more verbose, it does free you from any restraints, while still giving you modular building blocks based on Theano.
    Simply put: Lasagne functions as a happy medium between the low-level programming of Theano and the higher-level abstractions of Keras.

    My Go-To’s:

    5. Keras

    If I had to pick a favorite deep learning Python library, it would be hard for me to pick between Keras and mxnet — but in the end, I think Keras might win out.
    Really, I can’t say enough good things about Keras.
    Keras is a minimalist, modular neural network library that can use either Theano or TensorFlow as a backend. The primary motivation behind Keras is that you should be able to experiment fast and go from idea to result as quickly as possible.
    Architecting networks in Keras feels easy and natural. It includes some of the latest state-of-the-art algorithms for optimizers (Adam, RMSProp), normalization (BatchNorm), and activation layers (PReLU, ELU, LeakyReLU).
    Keras also places a heavy focus on Convolutional Neural Networks, something very near to my heart. Whether this was done intentionally or unintentionally, I think this is extremely valuable from a computer vision perspective.
    More to the point, you can easily construct both sequence-based networks (where the inputs flow linearly through the network) and graph-based networks (where inputs can “skip” certain layers, only to be concatenated later). This makes implementing more complex network architectures such as GoogLeNet and SqueezeNet much easier.
    My only problem with Keras is that it does not support multi-GPU environments for training a network in parallel. This may or may not be a deal breaker for you.
    If I want to train a network as fast as possible, then I’ll likely use mxnet. But if I’m tuning hyperparameters, I’m likely to setup four independent experiments with Keras (running on each of my Titan X GPUs) and evaluate the results.

    6. mxnet

    My second favorite deep learning Python library (again, with a focus on training image classification networks), would undoubtedly be mxnet. While it can take a bit more code to standup a network in mxnet, what it does give you is an incredible number of language bindings (C++, Python, R, JavaScript, etc.)
    The mxnet library really shines for distributed computing, allowing you to train your network across multiple CPU/GPU machines, and even in AWS, Azure, and YARN clusters.
    Again, it takes a little more code to get an experiment up and running in mxnet (as compared to Keras), but if you’re looking to distribute training across multiple GPUs or systems, I would use mxnet.

    7. sklearn-theano

    There are times where you don’t need to train a Convolutional Neural Network end-to-end. Instead, you need to treat the CNN as a feature extractor. This is especially useful in situations where you don’t have enough data to train a full CNN from scratch. Instead, just pass your input images through a popular pre-trained architecture such as OverFeat, AlexNet, VGGNet, or GoogLeNet, and extract features from the FC layers (or whichever layer you decide to use).
    In short, this is exactly what sklearn-theano allows you to do. You can’t train a model from scratch with it — but it’s fantastic for treating networks as feature extractors. I tend to use this library as my first stop when evaluating whether a particular problem is suitable for deep learning or not.

    8. nolearn

    I’ve used nolearn a few times already on the PyImageSearch blog, mainly when performing some initial GPU experiments on my MacBook Pro and performing deep learning on an Amazon EC2 GPU instance.
    While Keras wraps Theano and TensorFlow into a more user-friendly API, nolearn does the same — only for Lasagne. Furthermore, all code in nolearn is compatible with scikit-learn, a huge bonus in my book.
    personally don’t use nolearn for Convolutional Neural Networks (CNNs), although you certainly could (I prefer Keras and mxnet for CNNs) — I mainly use nolearn for its implementation of Deep Belief Networks (DBNs).

    9. DIGITS

    Alright, you got me.
    DIGITS isn’t a true deep learning library (although it is written in Python). DIGITS (Deep Learning GPU Training System) is actually a web application used for training deep learning models in Caffe (although I suppose you could hack the source code to work with a backend other than Caffe, but that sounds like a nightmare).
    If you’ve ever worked with Caffe before, then you know it can be quite tedious to define your .prototxt  files, generate your image dataset, run your network, and babysit your network training all via your terminal. DIGITS aims to fix this by allowing you to do (most) of these tasks in your browser.
    Furthermore, the user interface is excellent, providing you with valuable statistics and graphs as your model trains. I also like that you can easily visualize activation layers of the network for various inputs. Finally, if you have a specific image that you would like to test, you can either upload the image to your DIGITS server or enter the URL of the image and your Caffe model will automatically classify the image and display the result in your browser. Pretty neat!

    BONUS:

    10. Blocks

    I’ll be honest, I’ve never used Blocks before, although I do want to give it a try (hence why I’m including it in this list). Like many of the other libraries in this list, Blocks builds on top of Theano, exposing a much more user friendly API.

    11. deepy

    If you were to guess which library deepy wraps around, what would your guess be?
    That’s right, it’s Theano.
    I remember using deepy awhile ago (during one if its first initial commits), but I haven’t touched it in a good 6-8 months. I plan on giving it another try in future blog posts.

    12. pylearn2

    I feel compelled to include pylearn2 in this list for historical reasons, even though I don’t actively use it anymore. Pylearn2 is more than a general machine learning library (similar to scikit-learn in that it respect), but also includes implementations of deep learning algorithms.
    The biggest concern I have with pylearn2 is that (as of this writing), it does not have an active developer. Because of this, I’m hesitant to recommend pylearn2 over more maintained and active libraries such as Keras and mxnet.

    13. Deeplearning4j

    This is supposed to be a Python-based list, but I thought I would include Deeplearning4j in here, mainly out of the immense respect I have for what they are doing — building an open source, distributed deep learning library for the JVM.
    If you work in enterprise, you likely have a basement full of servers you use for Hadoop and MapReduce. Maybe you’re still using these machines. Maybe you’re not.
    But what if you could use these same machines to apply deep learning?
    It turns out you can — you just need Deeplearning4j.

    Take a deep dive into Deep Learning and Convolutional Neural Networks

    Figure 1: Learn how to utilize Deep Learning and Convolutional Neural Networks to classify the contents of images inside the PyImageSearch Gurus course.
    Figure 1: Learn how to utilize Deep Learning and Convolutional Neural Networks to classify the contents of images inside the PyImageSearch Gurus course.
    Curious about deep learning?
    I’m here to help.
    Inside the PyImageSearch Gurus course,  I’ve created 21 lessons covering 256 pages of tutorials on Neural Networks, Deep Belief networks, and Convolutional Neural Networks, allowing you to get up to speed qucikly and easily.
    To learn more about the PyImageSearch Gurus course (and grab 10 FREE sample lessons), just click the button below:
    Click here to learn more about PyImageSearch Gurus!

    Summary

    In this blog post, I reviewed some of my favorite libraries for deep learning and Convolutional Neural Networks. This list was by no means exhaustive and was certainly biased towards deep learning libraries that focus on computer vision and Convolutional Neural Networks.
    All that said, I do think this is a great list to utilize if you’re just getting started in the deep learning field and looking for a library to try out.
    In my personal opinion, I find it hard to beat Keras and mxnet. The Keras library sits on top of computational powerhouses such as Theano and TensorFlow, allowing you to construct deep learning architectures in remarkably few lines of Python code.
    And while it may take a bit more code to construct and train a network with mxnet, you gain the ability to distribute training across multiple GPUs easily and efficiently. If you’re in a multi-GPU system/environment and want to leverage this environment to its full capacity, then definitely give mxnet a try.
    Before you go, be sure to sign up for the PyImageSearch Newsletter using the form below to be notified when new deep learning posts are published (there will be a lot of them in the coming months!)
     সুতরাং আপনি গভীর শিক্ষণ এবং কনভলিউশনাল নিউরাল নেটওয়ার্কগুলিতে আগ্রহী। তবে আপনি কোথায় শুরু করবেন? আপনি কোন লাইব্রেরি ব্যবহার করেন? সেখানে অনেক আছে!
    এই ব্লগ পোস্টের অভ্যন্তরে, আমি আমার প্রিয় পাইথন গভীর শেখার লাইব্রেরিগুলির 9 টি বিশদ বর্ণনা করি  
    এই তালিকা  কোন মতে  সম্পূর্ণ , এটা শুধু লাইব্রেরি একটি তালিকা যে আমি আমার কম্পিউটার ভিশন কর্মজীবনের ব্যবহার করা হয় এবং এক সময় অথবা অন্য সময়ে বিশেষ দরকারী পাওয়া করেছি।
    এই লাইব্রেরির কয়েকটি আমি অন্যের চেয়ে বেশি ব্যবহার করি - বিশেষত  কেরাস ,  এমএক্সনেট এবং  স্ক্লেরেন-থিয়ানো ।
    অন্যগুলি, আমি পরোক্ষভাবে ব্যবহার করি  যেমন  থিয়েও  এবং  টেনসরফ্লো (যা কেরাস , গভীর এবং ব্লকগুলির মতো লাইব্রেরিগুলি তৈরি করে)।
    এবং এমনকি অন্যরাও, আমি কেবল খুব নির্দিষ্ট কাজের  জন্য ব্যবহার করি  (যেমন  নোলার্ন এবং তাদের ডিপ বিশ্বাসের বাস্তবায়ন)।
    এই ব্লগ পোস্টটির লক্ষ্য আপনাকে এই লাইব্রেরিতে পরিচয় করিয়ে দেওয়া। আপনার বিশেষ পরিস্থিতিতে কোনটি আপনার পক্ষে সবচেয়ে ভাল কাজ করবে তা নির্ধারণ করতে আমি পৃথকভাবে তাদের প্রত্যেককে পড়তে উত্সাহিত করি।

    আমার শীর্ষ 9 প্রিয় পাইথন ডিপ লার্নিং লাইব্রেরি

    আবার, আমি আবারও বলতে চাই যে এই তালিকাটি  কোনওভাবেই সম্পূর্ণ নয় । উপরন্তু, যেহেতু আমি একটি কম্পিউটার ভিশন গবেষক ও সক্রিয়ভাবে মাঠে কাজ আছি  অনেক এরকম লাইব্রেরীর উপর Convolutional নিউরাল নেটওয়ার্ক (CNNs) একটি শক্তিশালী ফোকাস আছে।
    আমি গভীর শিক্ষার পাঠাগারগুলির এই তালিকাটি তিন ভাগে ভাগ করেছি।
    প্রথম অংশে জনপ্রিয় গ্রন্থাগারগুলির বিবরণ রয়েছে যা আপনি ইতিমধ্যে পরিচিত হতে পারেন। এই লাইব্রেরির প্রত্যেকের জন্য আমি একটি খুব সাধারণ, উচ্চ-স্তরের ওভারভিউ সরবরাহ করি। তারপরে আমি কয়েকটি লাইব্রেরি সম্পর্কে আমার পছন্দ ও অপছন্দগুলি এবং কয়েকটি উপযুক্ত ব্যবহারের ক্ষেত্রে বিশদ বিবরণ করি।
    মধ্যে দ্বিতীয় অংশ ধনী  আমার ব্যক্তিগত প্রিয় গভীর লার্নিং লাইব্রেরি যে আমি ব্যবহার  প্রচন্ডভাবে একটি উপর  নিয়মিত (: Keras, mxnet এবং sklearn-theano ইঙ্গিত)।
    পরিশেষে, আমি লাইব্রেরিগুলির জন্য একটি "বোনাস" বিভাগ সরবরাহ করি যা আমার (১) দীর্ঘ সময় ব্যবহার করা হয়নি, তবে এখনও আপনি মনে করেন যে আপনি দরকারী বা (2) লাইব্রেরি খুঁজে পেতে পারেন যা আমি এখনও চেষ্টা করি নি, তবে আকর্ষণীয় দেখায়।
    আসুন এগিয়ে যান এবং ডুব!

    নতুনদের জন্য:

    1. ক্যাফে

    ক্যাফে না নিয়েই "গভীর শিক্ষার পাঠাগারগুলি" উল্লেখ করা অসম্ভব অসম্ভব। আসলে আপনি যেহেতু এই পৃষ্ঠায় এখনই গভীর শিক্ষাগ্রহণ গ্রন্থাগারগুলি পড়ছেন, আমি বাজি রাখতে আগ্রহী যে আপনি  ইতিমধ্যে ক্যাফে সম্পর্কে শুনেছেন।
    তো, ক্যাফে ঠিক কী?
    ক্যাফে হ'ল বার্কলে ভিশন অ্যান্ড লার্নিং সেন্টার (বিভিএলসি) দ্বারা নির্মিত একটি গভীর শিক্ষার কাঠামো । এটি মডুলার। অত্যন্ত দ্রুত। এবং এটি একাডেমিকস এবং শিল্প-দ্বারা-শিল্প-অ্যাপ্লিকেশনগুলিতে ব্যবহার করা হয়।
    আসলে, আপনি যদি সর্বাধিক সাম্প্রতিক গভীর শেখার প্রকাশনাগুলি (যেটি উত্স কোডও সরবরাহ করে ) নিয়ে যেতে হয় তবে আপনি সম্ভবত তাদের সম্পর্কিত গিটহাবের সংগ্রহশালাগুলিতে ক্যাফের মডেলগুলি খুঁজে পাবেন।
    যদিও Caffe  নিজেই একটি পাইথন গ্রন্থাগার নয়, এটা  করে পাইথন প্রোগ্রামিং ভাষা মধ্যে বাইন্ডিং প্রদান। বাস্তবে বন্যদেহে আমাদের নেটওয়ার্ক স্থাপন করার সময় আমরা সাধারণত এই বাইন্ডিংগুলি ব্যবহার করি  
    আমি ক্যাফকে এই তালিকায় অন্তর্ভুক্ত করার কারণ এটি প্রায় সর্বত্র ব্যবহৃত হয়েছে  । আপনি আপনার মডেল আর্কিটেকচার এবং সলভার পদ্ধতিগুলি একটি প্লেইন টেক্সট, JSON- এর মতো ফাইল হিসাবে সংজ্ঞায়িত করেন । প্রোটোটেক্সট   কনফিগারেশন ফাইল। ক্যাফে বাইনারিগুলি এগুলি গ্রহণ করে । প্রোটোটেক্সট   ফাইল এবং আপনার নেটওয়ার্ক প্রশিক্ষণ। ক্যাফে প্রশিক্ষণ শেষ করার পরে, আপনি নিজের নেটওয়ার্কটি নিতে এবং ক্যাফ বাইনারিগুলির মাধ্যমে নতুন চিত্রগুলিকে শ্রেণিবদ্ধ করতে পারেন, বা আরও ভাল, পাইথন বা ম্যাটল্যাব এপিআইয়ের মাধ্যমে।
    যদিও আমি ক্যাফকে তার অভিনয়ের জন্য ভালবাসি (এটি কোনও কে 40 জিপিইউতে প্রতিদিন 60 মিলিয়ন চিত্রের প্রক্রিয়া করতে পারে ), আমি কেরাস বা এমএক্সনেটের মতো এটি পছন্দ করি না।
    মূল কারণটি হ'ল অভ্যন্তরের অভ্যন্তরে কোনও আর্কিটেকচার নির্মাণ করা । প্রোটোটেক্সট   ফাইলগুলি বেশ ক্লান্তিকর এবং ক্লান্তিকর হয়ে উঠতে পারে। এবং বিন্দু আরো  Caffe সঙ্গে টিউনিং hyperparameters না পারেন, হতে (সহজে) প্রোগ্রামের মাধ্যমে সম্পন্ন এই দুটি কারণে, আমি লাইব্রেরির দিকে ঝুঁকির প্রবণতা করি যা পাইথন ভিত্তিক এপিআইতে আমাকে শেষ-থেকে-শেষের নেটওয়ার্ক (ক্রস-বৈধকরণ এবং হাইপারপ্যারামিটার টিউনিং সহ) প্রয়োগ করতে দেয় allow

    2. থিয়ানো

    থিয়ানো সুন্দরী বলে আমি শুরু করে দিই  । Theano ছাড়া, আমরা হতো না  কাছাকাছি কোনো জায়গায় গভীর লার্নিং লাইব্রেরি পরিমাণ (পাইথন এ বিশেষভাবে) যে আমরা আজ না। নুমপি ছাড়া আমরা যেভাবে সায়পি, সাইকিট-লার্ন, এবং সাইকিট-ইমেজ রাখতে পারি নি, তিওনো এবং গভীর শিক্ষার উচ্চ স্তরের বিমূর্ততা সম্পর্কেও একই কথা বলা যেতে পারে।
    একেবারে মূল অংশে, থায়ানো একটি পাইথন গ্রন্থাগার যা বহুমাত্রিক অ্যারেগুলিতে জড়িত  গাণিতিক অভিব্যক্তি সংজ্ঞা, অনুকূলকরণ এবং মূল্যায়ন করতে ব্যবহৃত হয়  । থিয়ানো নুমপি এবং জিপিইউর স্বচ্ছ ব্যবহারের সাথে দৃ tight় সংহতকরণের মাধ্যমে এটি সম্পাদন করে।
    আপনি  থিয়ানোতে গভীর শিক্ষার নেটওয়ার্ক তৈরি করতে পারার সময় আমি থিয়ানোকে নিউরাল নেটওয়ার্কগুলির জন্য বিল্ডিং ব্লক হিসাবে ভাবতে চাই, নুমপি  বৈজ্ঞানিক কম্পিউটিংয়ের যেভাবে বিল্ডিং ব্লক হিসাবে কাজ করে। প্রকৃতপক্ষে, বেশিরভাগ লাইব্রেরিগুলিকে আমি উল্লেখ করি এই ব্লগ পোস্টে থিয়ানোকে আরও সুবিধাজনক এবং অ্যাক্সেসযোগ্য করার জন্য মোড়ানো।
    আমাকে ভুল করবেন না,  আমি থিওনোকে ভালবাসি -  আমি থিয়ানোতে কোড লেখা পছন্দ করি না।
    নিখুঁত তুলনা না হলেও, থানো-তে একটি কনভ্যোলিউশনাল নিউরাল নেটওয়ার্ক তৈরি করা নেটিম পাইথনে কাস্টম সাপোর্ট ভেক্টর মেশিন (এসভিএম) লেখার মতো যা কেবলমাত্র নিম্পির ছিটিয়ে রয়েছে।
    আপনি এটা করতে পারেন?
    অবশ্যই, একদম।
    এটা কি আপনার সময় এবং প্রচেষ্টার পক্ষে মূল্যবান?
    হ্যাঁ, হতে পারে। এটি নির্ভর করে আপনি কীভাবে নিম্ন-স্তরের যেতে চান / আপনার অ্যাপ্লিকেশন প্রয়োজন।
    ব্যক্তিগতভাবে, আমি বরং Keras মত একটি লাইব্রেরি ব্যবহার চাই  গোপন আরো একটি ব্যবহারকারী বান্ধব এপিআই মধ্যে Theano একই ভাবে যে মেশিন লার্নিং আলগোরিদিম সঙ্গে এটি কাজ সহজ করে তোলে scikit-শিখতে।

    3. টেনসরফ্লো

    থানো-এর মতোই, টেনসরফ্লো হ'ল ডেটা ফ্লো গ্রাফগুলি ব্যবহার করে সংখ্যার গণনার জন্য একটি ওপেন সোর্স লাইব্রেরি (যা নিউরাল নেটওয়ার্কটি আসলেই রয়েছে)। মূলত গুগলের মেশিন ইন্টেলিজেন্স গবেষণা সংস্থার মধ্যে গুগল ব্রেইন টিমের গবেষকরা তৈরি করেছেন, গ্রন্থাগারটি তখন থেকে উন্মুক্ত স্রোসযুক্ত এবং সাধারণ মানুষের জন্য উপলব্ধ করা হয়েছে।
    টেনসরফ্লো (থিয়ানো এর তুলনায়) এর প্রাথমিক উপকারটি  বিশেষত একাধিক-জিপিইউগুলির মধ্যে (যদিও এটি থিয়ানো কাজ করছে) এর মধ্যে  কম্পিউটার বিতরণ করা হয়।
    টেনসরফ্লো (থিয়েওয়ের পরিবর্তে) ব্যবহারের জন্য কেরাস ব্যাকএন্ডে অদলবদল করা ছাড়া অন্য টেনসরফ্লো লাইব্রেরির সাথে আমার খুব বেশি অভিজ্ঞতা নেই। পরের কয়েক মাস ধরে আমি আশা করি এটি পরিবর্তিত হবে।

    4.  লাসাগনে

    লাসাগন একটি হালকা ওজনের লাইব্রেরি যা থায়ানোতে  নেটওয়ার্ক তৈরি এবং প্রশিক্ষণের জন্য ব্যবহৃত হয়। এখানে মূল শব্দটি  হালকা ওজনের - এটি কেরাসের মতো থানোকে ঘিরে ভারী মোড়কের বোঝা নয়। আপনার কোড এই বিশালাকার হচ্ছে আরো বাগাড়ম্বরপূর্ণ, তাহলেও এটি  নেই যদি আপনি কোন বাধা থেকে, যখন এখনও তোমাকে মডুলার ভবন Theano উপর ভিত্তি করে ব্লক দান মুক্ত।
    সোজা কথায়: লাসাগন থানো-এর নিম্ন-স্তরের প্রোগ্রামিং এবং কেরাসের উচ্চ-স্তরের বিমূর্তনের মধ্যে একটি সুখী মাধ্যম হিসাবে কাজ করে।

    আমার যেতে:

    5. হার্ড

    যদি আমি একটি বাছাই ছিল  প্রিয় গভীর লার্নিং পাইথন গ্রন্থাগার, এটা কঠিন হবে আমাকে Keras এবং mxnet মধ্যে বাছাই জন্য - কিন্তু শেষ পর্যন্ত, আমি মনে করি Keras আউট জয় করতে পারি।
    সত্যিই, কেরাস সম্পর্কে আমি যথেষ্ট ভাল জিনিস বলতে পারি না।
    Keras একটি অল্পস্বল্প, যে ব্যবহার করতে পারেন মডুলার স্নায়ুর নেটওয়ার্ক লাইব্রেরী  পারেন একটি ব্যাকএন্ড যেমন Theano বা TensorFlow। কেরাসের পেছনের প্রাথমিক অনুপ্রেরণা হ'ল আপনি দ্রুত পরীক্ষা-নিরীক্ষা করতে সক্ষম হন এবং ধারণা  থেকে  যত তাড়াতাড়ি সম্ভব ফলাফলের দিকে যাওয়া উচিত  
    কেরাসে আর্কিটেকচার নেটওয়ার্কগুলি সহজ এবং  প্রাকৃতিক মনে হয়  । এটি অপটিমাইজারগুলির জন্য সর্বশেষতম অত্যাধুনিক অ্যালগরিদমগুলি (অ্যাডাম, আরএমএসপ্রপ), নরমালাইজেশন (ব্যাচনরম) এবং অ্যাক্টিভেশন স্তরগুলি (PReLU, ELU, LeakyReLU) অন্তর্ভুক্ত করে।
    কেরাস কনভলিউশনাল নিউরাল নেটওয়ার্কগুলিতেও একটি গুরুতর ফোকাস রাখে, এটি আমার হৃদয়ের খুব কাছে। এটি ইচ্ছাকৃতভাবে বা অজান্তেই করা হয়েছিল,  আমি মনে করি এটি কম্পিউটার দৃষ্টিভঙ্গির দৃষ্টিকোণ থেকে অত্যন্ত মূল্যবান।
    আরও উল্লেখযোগ্যভাবে, আপনি সহজেই উভয় সিকোয়েন্স-ভিত্তিক নেটওয়ার্কগুলি (যেখানে ইনপুটগুলি নেটওয়ার্কের মধ্য দিয়ে রৈখিকভাবে প্রবাহিত হয়) এবং গ্রাফ-ভিত্তিক নেটওয়ার্কগুলি (যেখানে ইনপুটগুলি নির্দিষ্ট স্তরগুলিকে "এড়িয়ে যেতে" পারে, কেবল পরে সংযুক্ত করার জন্য) উভয়ই নির্মাণ করতে পারেন ruct এটি আরও জটিল নেটওয়ার্ক আর্কিটেকচারগুলি যেমন গুগলনেট এবং স্কিজনেটকে  আরও সহজ করে তোলে ।
    কেরাসের সাথে আমার একমাত্র সমস্যা হ'ল এটি সমান্তরালভাবে কোনও নেটওয়ার্ক প্রশিক্ষণের জন্য মাল্টি-জিপিইউ পরিবেশকে সমর্থন করে না। এটি আপনার পক্ষে ডিল ব্রেকার হতে পারে বা নাও হতে পারে।
    যদি আমি কোনও নেটওয়ার্ককে যত দ্রুত সম্ভব প্রশিক্ষণ দিতে চাই  , তবে আমি সম্ভবত এমএক্সনেট ব্যবহার করব। তবে আমি যদি হাইপারপ্যারামিটারগুলি টিউন করছি তবে আমি কেরাসের সাথে চারটি স্বতন্ত্র পরীক্ষা নিরীক্ষণের (আমার প্রতিটি টাইটান এক্স জিপিইউতে চলছে) এবং ফলাফলগুলি মূল্যায়ন করার সম্ভাবনা করছি।

    6. এমএক্সনেট

    আমার দ্বিতীয় প্রিয় গভীর শেখার পাইথন গ্রন্থাগার (আবার, চিত্রের শ্রেণিবদ্ধকরণ নেটওয়ার্কগুলির প্রশিক্ষণের উপর মনোনিবেশ সহ) নিঃসন্দেহে এমএক্সনেট হবে। যদিও এমএক্সনেটে নেটওয়ার্ক স্ট্যান্ডআপ করতে এটি আরও কিছুটা কোড নিতে পারে, এটি  আপনাকে যা দেয় তা হল ভাষার বাইন্ডিংয়ের একটি অবিশ্বাস্য সংখ্যা (সি ++, পাইথন, আর, জাভাস্ক্রিপ্ট ইত্যাদি))
    এমএক্সনেট লাইব্রেরি বিতরণ করা কম্পিউটিংয়ের জন্য সত্যই জ্বলজ্বল করে , আপনাকে একাধিক সিপিইউ / জিপিইউ মেশিন জুড়ে এমনকি এডাব্লুএস, অ্যাজুরি এবং ইয়ার্ন ক্লাস্টারে  আপনার নেটওয়ার্ক প্রশিক্ষণের অনুমতি দেয়।
    আবার, এমএক্সনেটে (কেরাসের তুলনায়) একটি পরীক্ষা-নিরীক্ষা চালিয়ে যেতে আরও কিছু কোড লাগবে, তবে আপনি যদি একাধিক জিপিইউ বা সিস্টেম জুড়ে প্রশিক্ষণ বিতরণ করতে চান তবে  আমি এমএক্সনেট ব্যবহার করব।

    7. sklearn-theano

    এমন সময় আছে যেখানে আপনাকে কনভোলিউশনাল নিউরাল নেটওয়ার্কের শেষে থেকে শেষের প্রশিক্ষণ দেওয়ার দরকার নেই। পরিবর্তে, আপনাকে সিএনএনকে বৈশিষ্ট্য নিষ্কাশনকারী হিসাবে বিবেচনা করতে হবে  । এটি  বিশেষত এমন পরিস্থিতিতে কার্যকর যেখানে আপনার কাছে স্ক্র্যাচ থেকে পুরো সিএনএন প্রশিক্ষণের জন্য পর্যাপ্ত ডেটা নেই। পরিবর্তে, কেবলমাত্র আপনার ইনপুট চিত্রগুলি ওভারফিট, অ্যালেক্সনেট, ভিজিজি নেট, বা গুগলনেট এর মতো জনপ্রিয় প্রাক-প্রশিক্ষিত আর্কিটেকচারের মাধ্যমে পাস করুন এবং এফসি স্তরগুলি (বা যে কোনও স্তরটি আপনি ব্যবহার করার সিদ্ধান্ত নেবেন) থেকে বৈশিষ্ট্যগুলি বের করুন।
    সংক্ষেপে, স্কেলের্ন-থিয়ানো আপনাকে ঠিক এটি  করতে দেয়। আপনি এটির সাহায্যে কোনও মডেলকে স্ক্র্যাচ থেকে প্রশিক্ষণ দিতে পারবেন না - তবে নেটওয়ার্কগুলি বৈশিষ্ট্য নিষ্কর্ষক হিসাবে চিকিত্সা করার জন্য এটি  দুর্দান্ত । গভীর সমস্যা শেখার জন্য কোনও নির্দিষ্ট সমস্যা উপযুক্ত কিনা তা মূল্যায়ন করার সময় আমি এই গ্রন্থাগারটিকে আমার প্রথম স্টপ হিসাবে ব্যবহার করার ঝোঁক করি।

    8. nolearn

    আমি পাইয়েমেজসন্ধান ব্লগে ইতিমধ্যে কয়েকবার নোলার্ন ব্যবহার করেছি, মূলত যখন আমার ম্যাকবুক প্রোতে কিছু প্রাথমিক জিপিইউ পরীক্ষা-নিরীক্ষা করে  এবং একটি অ্যামাজন ইসি 2 জিপিইউ ইনস্ট্যান্সে গভীর শিক্ষণ সম্পাদন করে ।
    কেরাস থিয়ানো এবং টেনসরফ্লোকে আরও বেশি ব্যবহারকারী-বান্ধব এপিআইতে আবৃত করার সময় নোলার্ন একই কাজ করে - কেবল লাসাগেনের জন্য। তদ্ব্যতীত, নোলার্নে সমস্ত কোড সায়্কিট-লার্নের সাথে সামঞ্জস্যপূর্ণ, আমার বইয়ের একটি  বিশাল বোনাস ।
    আমি  ব্যক্তিগতভাবে কনভলিউশনাল নিউরাল নেটওয়ার্ক (সিএনএন) এর জন্য নোলার্ন ব্যবহার করি না, যদিও আপনি অবশ্যই (আমি সিএনএনগুলির জন্য কেরাস এবং এমএক্সনেট পছন্দ করতে পারি) - আমি মূলত ডিপ বিলিফ নেটওয়ার্ক (ডিবিএন) এর প্রয়োগের জন্য নোলার্ন ব্যবহার করি।

    9.  ডিজিটস

    ঠিক আছে, আপনি আমাকে পেয়েছেন।
    ডিজিটের একটি সত্য গভীর শিক্ষা গ্রন্থাগার (যদিও তা না হয়  করা হয় পাইথন লেখা)। ডিজিটস (ডিপ লার্নিং জিপিইউ প্রশিক্ষণ সিস্টেম) আসলে একটি  ওয়েব অ্যাপ্লিকেশন যা ক্যাফেতে গভীর শেখার মডেলগুলি প্রশিক্ষণের জন্য ব্যবহৃত হয় (যদিও আমি মনে করি আপনি ক্যাফ ছাড়া অন্য ব্যাকএন্ডের সাথে কাজ করার জন্য উত্স কোডটি হ্যাক করতে পারতেন, তবে এটি স্বপ্নদোষের মতো মনে হয়)।
    আপনি যদি এর আগে কখনও ক্যাফের সাথে কাজ করেন, তবে আপনি জানেন যে এটির সংজ্ঞা দেওয়া আপনার পক্ষে যথেষ্ট ক্লান্তিকর হতে পারে । প্রোটটেক্সট   ফাইলগুলি, আপনার চিত্রের ডেটাসেট তৈরি করুন, আপনার নেটওয়ার্ক চালান এবং আপনার টার্মিনাল জুড়ে আপনার নেটওয়ার্ক প্রশিক্ষণের ব্যবস্থা করুন। ডিজিটগুলির লক্ষ্য আপনার ব্রাউজারে আপনাকে এই (বেশিরভাগ) কাজগুলি করার অনুমতি দিয়ে এটি ঠিক করা।
    তদুপরি, ইউজার ইন্টারফেসটি  দুর্দান্ত , আপনাকে আপনার মডেল ট্রেন হিসাবে মূল্যবান পরিসংখ্যান এবং গ্রাফ সরবরাহ করে। আমি এও পছন্দ করি যে আপনি বিভিন্ন ইনপুটগুলির জন্য সহজেই নেটওয়ার্কের অ্যাক্টিভেশন স্তরগুলি কল্পনা করতে পারেন। অবশেষে, যদি আপনার কাছে একটি  নির্দিষ্ট চিত্র থাকে যা আপনি পরীক্ষা করতে চান তবে আপনি হয় চিত্রটি আপনার ডিজিট সার্ভারে আপলোড করতে পারেন বা চিত্রটির URL টি প্রবেশ করতে পারেন এবং আপনার ক্যাফে মডেলটি স্বয়ংক্রিয়ভাবে চিত্রটির শ্রেণিবদ্ধকরণ করবে এবং ফলাফলটি আপনার ব্রাউজারে প্রদর্শন করবে। বেশ ঝরঝরে!

    বোনাস:

    10. ব্লক

    আমি সত্যবাদী হব, এর আগে আমি কখনও ব্লক ব্যবহার করিনি, যদিও আমি এটি চেষ্টা করে দেখতে চাই না (তাই কেন আমি এটি এই তালিকায় অন্তর্ভুক্ত করছি)। এই তালিকার অন্যান্য গ্রন্থাগারের অনেকের মতোই ব্লকগুলি থিয়ানো শীর্ষে তৈরি করে এবং আরও অনেক বেশি ব্যবহারকারী বান্ধব এপিআই প্রকাশ করে।

    11. গভীর

    আপনি যদি অনুমান করতে পারেন যে কোন লাইব্রেরিটি গভীরভাবে জড়িয়ে আছে, আপনার অনুমান কী হবে?
    এটা ঠিক, এটা থানো।
    আমার মনে আছে কিছুক্ষণ আগে গভীর ব্যবহার করা হয়েছে (এটির প্রথমটি যদি প্রাথমিকভাবে করা হয় তবে) তবে আমি 6-8 মাসের মধ্যে এটি স্পর্শ করতে পারি নি। ভবিষ্যতের ব্লগ পোস্টগুলিতে এটি আবার চেষ্টা করার পরিকল্পনা করছি।

    12. পাইলার্ন 2

    আমি এখন পর্যন্ত সক্রিয়ভাবে এটি ব্যবহার না করেও historicalতিহাসিক কারণে এই তালিকায় পাইরেইন 2 অন্তর্ভুক্ত করতে বাধ্য হচ্ছি। পাইাইলারন 2 সাধারণ মেশিন লার্নিং লাইব্রেরির চেয়েও বেশি (বিজ্ঞান-শিখার সাথে সমান যে এটি সম্মান করে) তবে গভীর শেখার অ্যালগরিদমের বাস্তবায়নও অন্তর্ভুক্ত করে।
    পাইাইলারন 2 নিয়ে আমার সবচেয়ে বড় উদ্বেগটি হ'ল (এই লেখার মতো), এতে সক্রিয় বিকাশকারী নেই । এর কারণে, আমি কেরাস এবং এমএক্সনেটের মতো আরও রক্ষণাবেক্ষণ এবং সক্রিয় লাইব্রেরির চেয়ে পাইরনার 2 সুপারিশ করতে দ্বিধা বোধ করছি।

    13. ডিপলাইনিং 4 জ

    এটি পাইথন ভিত্তিক তালিকা বলে মনে করা হয়, তবে আমি ভেবেছিলাম যে আমি ডিপ্লিয়ার্নিং ৪ জে এখানে অন্তর্ভুক্ত করব, মূলত তারা যা করছে তার জন্য আমার যে প্রচুর শ্রদ্ধা  রয়েছে - একটি উন্মুক্ত উত্স তৈরি করা, জেভিএমের  জন্য গভীর শিক্ষার পাঠাগার বিতরণ করা হয়েছে।
    আপনি যদি এন্টারপ্রাইজে কাজ করেন তবে আপনার সম্ভবত হ্যাডোপ এবং মানচিত্রের জন্য ব্যবহার করা সার্ভারগুলির পূর্ণ একটি বেসমেন্ট রয়েছে। হতে পারে আপনি এখনও এই মেশিনগুলি ব্যবহার করছেন। সম্ভবত আপনি না।
    তবে আপনি যদি এই একই মেশিনগুলি গভীর শিক্ষার প্রয়োগের জন্য ব্যবহার করতে পারেন  ?
    দেখা যাচ্ছে যে আপনি পারবেন - আপনার কেবল ডিপ্লিয়ারিং 4 জে দরকার।

    ডিপ লার্নিং এবং কনভলিউশনাল নিউরাল নেটওয়ার্কগুলিতে একটি গভীর ডুব নিন

    চিত্র 1: পাইআইমেজস সার্চ গুরুস কোর্সের ভিতরে চিত্রগুলির বিষয়বস্তুগুলিকে শ্রেণিবদ্ধ করতে কীভাবে ডিপ লার্নিং এবং কনভলিউশনাল নিউরাল নেটওয়ার্কগুলি ব্যবহার করতে হয় তা শিখুন।
    চিত্র 1: পাইআইমেজস সার্চ গুরুস কোর্সের ভিতরে চিত্রগুলির বিষয়বস্তুগুলিকে শ্রেণিবদ্ধ করতে কীভাবে ডিপ লার্নিং এবং কনভলিউশনাল নিউরাল নেটওয়ার্কগুলি ব্যবহার করবেন তা শিখুন।
    গভীর শিক্ষা সম্পর্কে কৌতূহল?
    আমি এখানে সাহায্য করতে এসেছি।
    ইনসাইড PyImage Search গুরু অবশ্যই , আমি তৈরি করেছি  21 পাঠ আচ্ছাদন  টিউটোরিয়াল 256 পৃষ্ঠাগুলি নিউরাল নেটওয়ার্ক, ডিপ বিশ্বাস নেটওয়ার্ক, এবং Convolutional নিউরাল নেটওয়ার্ক, আপনি qucikly এবং সহজে গতি বাড়াতে পেতে সক্ষম হবেন।
    পাইআইমেজ অনুসন্ধান গ্রাস কোর্স সম্পর্কে আরও জানতে (এবং 10 টি নিখরচায় নিখরচায়  পাঠ গ্রহণ করুন ), নীচের বোতামটিতে ক্লিক করুন:

    সারসংক্ষেপ

    এই ব্লগ পোস্টে, আমি গভীর শিক্ষা এবং কনভোলিউশনাল নিউরাল নেটওয়ার্কগুলির জন্য আমার কয়েকটি প্রিয় লাইব্রেরি পর্যালোচনা করেছি। এই তালিকাটি কোনওভাবেই পরিসীমাবদ্ধ ছিল না এবং অবশ্যই গভীর শিক্ষার পাঠাগারগুলির প্রতি পক্ষপাতদুষ্ট ছিল যা কম্পিউটার দৃষ্টিভঙ্গি এবং কনভোলিউশনাল নিউরাল নেটওয়ার্কগুলিকে কেন্দ্র করে।
    যে সমস্ত বললেন, আমি  কি এই করছি আপনি শুধু গভীর শেখার ক্ষেত্রে শুরু এবং একটি লাইব্রেরি খুঁজছেন চেষ্টা করে ব্যবহার করতে একটি মহান তালিকা হয় মনে।
    আমার ব্যক্তিগত মতামত, আমি এটি হার্ড বীট এটি Keras এবং mxnet । কেরাস গ্রন্থাগারটি থিয়ানো এবং টেনসরফ্লোর মতো কম্পিউটারের পাওয়ার হাউসের শীর্ষে বসে আপনাকে পাইথন কোডের উল্লেখযোগ্য কয়েকটি লাইনে গভীর শিক্ষার আর্কিটেকচার তৈরি করতে সহায়তা করে।
    এবং যদিও এমএক্সনেট দিয়ে একটি নেটওয়ার্ক তৈরি এবং প্রশিক্ষণে কিছুটা আরও কোড লাগতে পারে, আপনি  একাধিক জিপিইউতে  সহজে এবং দক্ষতার সাথে বিতরণ করার দক্ষতা অর্জন করতে  পারেন। আপনি যদি কোনও মাল্টি-জিপিইউ সিস্টেম / পরিবেশে থাকেন এবং এই পরিবেশটিকে সম্পূর্ণ দক্ষতার সাথে অর্জন করতে চান তবে অবশ্যই এমএক্সনেটকে চেষ্টা করে দেখুন।
  • 0 comments:

    Post a Comment

    New Research

    Attention Mechanism Based Multi Feature Fusion Forest for Hyperspectral Image Classification.

    CBS-GAN: A Band Selection Based Generative Adversarial Net for Hyperspectral Sample Generation.

    Multi-feature Fusion based Deep Forest for Hyperspectral Image Classification.

    ADDRESS

    388 Lumo Rd, Hongshan, Wuhan, Hubei, China

    EMAIL

    contact-m.zamanb@yahoo.com
    mostofa.zaman@cug.edu.cn

    TELEPHONE

    #
    #

    MOBILE

    +8615527370302,
    +8807171546477