Part 2 blogs

I heard recently that the pytorch core team is working on onnx support which is going to make things a lot more straightforward as it provides an open source translation between different languages and tools. Once that’s in place we’ll be able to use pytorch to write the model, and then translate it into tensorflow serving or some other serving API designed for inference. Not sure about the timelines there but there are researchers thinking about his.

Great blog, and I’m definitely looking forward to part II as I have similar deployment challenges.

That’s a useful link. I don’t think running a model on such large images is a common requirement, so the fact that this edge case isn’t well supported by Pytorch yet with CPU inference is hardly a reason to say you can’t use it in production!

To me, the excellent support you received from the core team on that thread and the information provided about how this issue is being worked on gives me a lot of confidence that production use of the library is in fact a priority. Plus of course the ongoing work on ONNX support.

1 Like

Probably best place to answer that question is classic computer vision papers. There’s been a lot of work on this over the decades. E.g. there’s a whole literature on adding and removing haze in images.

1 Like

That’s a useful link. I don’t think running a model on such large images is a common requirement, so the fact that this edge case isn’t well supported by Pytorch yet with CPU inference is hardly a reason to say you can’t use it in production!

Agreed I’m sorry I wasn’t specific enough: Pytorch is not meant for production for all use cases. Now consider mine with SRPGAN. This stuff is just impossible to run on CPU for the aforementioned issue. Thing is, GPU memory are very limited, use an image with dimensions above 700x700 and you run out of cuda memory on a titan X. With the CPU you just add more ram, with the GPU you buy a new one (if one exists with you cuda memory requirements). And I’m not talking about the cost of gpu vs cpu. When you start scaling that becomes a real, expensive issue.

Probably best place to answer that question is classic computer vision papers. There’s been a lot of work on this over the decades. E.g. there’s a whole literature on adding and removing haze in images.

Interesting, I’ll def take a look, thanks for the tip :slight_smile:.

To me, the excellent support you received from the core team on that thread and the information provided about how this issue is being worked on gives me a lot of confidence that production use of the library is in fact a priority

Agreed. The support was very good and I’m also confident for the future but for now it’s… complicated :frowning:

I heard recently that the pytorch core team is working on onnx support which is going to make things a lot more straightforward as it provides an open source translation between different languages and tools.

Plus of course the ongoing work on ONNX support.

Onnx won’t solve everything unfortunately :frowning: . This is also something I considered when I deployed my model. Onnx need static models and using it for dynamic neural networks such as RNN or networks with variable input size (like on my project) won’t work. It basically works like this: You use a fixed size input, wrap your model around the onnx package and run a batch through it. Onnx will then infer the different layers by which your inputs passed through and create a resulting representation that you can export to other frameworks.
The way it works today makes it by nature very limited :frowning:.

4 Likes

Yup that’s a good point.

3 Likes

To add the link: https://app.grammarly.com

I’ve found Grammarly really useful since Medium or Markdown apps don’t provide grammar corrections. Please check out the browser extension-it’s a lifesaver!

6 Likes

Updated with new intro and a bit of cleanup:

http://matttrent.com/remote-development/

2 Likes

Blog Post: Quick Guide for setting up PyTorch in Window in 2 mins

For those who have an older GPU like me (Geforce 930M) that cannot run on PyTorch 0.3.1, please have a look on this.

1 Like

Hello Guys,
I have written a blog post on how I used YOLO v2 for Number plate detection on Indian car vehicles. I’d like to seek your suggestions and improvements to this post, hope it will be useful for someone working with YOLO.

4 Likes

I think that’s great! One thing I’d be interested in hear more about is how you collected the training data, and how much data did you need to get these results (and how long did that take to label)? Might be a nice addition to your article.

1 Like

Not quite related to what we’ve been talking about in class recently, but related to transfer learning, which is a recurring topic in fastai, I just wrote a post on reproducing two papers whose aim can essentially be described as “how do you train some initial weights specifically so that they can easily be fine-tuned”:

My reproduction is based on a toy problem, but this can be applied to image classification so that it is possible to classify images using extremely few gradient descent operations and extremely few examples.

As far as I know, no-one has ever tried to pre-train a resnet-sized network on a very large dataset using these techniques. Curious what the result would be.

2 Likes

Thanks for the post - looking forward to reading it. What do you think is stopping people from using this on larger datasets/models?

Thank you @jeremy. We are working with a government body here in bangalore, it took 2.5 months to collect data and do labelling. I used 1640 images for getting these results. The dataset includes the images taken from 3 different CCTV cameras at different angles. I will be adding this to the article.

Yeah that’s a good question. One possible answer simply comes from my own ignorance: maybe it would be too slow to train and everybody knows it, maybe someone’s already done it and I just don’t know, maybe this wouldn’t work well with datasets that aren’t tiny (this is mostly used for datasets of a few tens of examples).

However, I suspect another reason is that these researchers are working in the context of a specific problem (K-shot learning) in which they basically have to use tiny models because, again, they are training on only tens of examples. It might not have occurred to them to create the next great pretrained model for medium-sized dataset because it’s just not the area they’re competing in. If that’s the case, this might be a great opportunity to do something cool.

It’s also worth noting that although the MAML paper is a year old, the Reptile paper is only a month old and it is much simpler likely much faster for big models. Again, possibly a reason why there is something to do there.

So here I am, continuing my plan to post blogs every week on topics covered/related to lessons. Very very basic post, still may prove useful to someone.

Though this one is unrelated to todays or last weeks lesson, let me know your thoughts :slight_smile:

Convolutional Neural Network - II

I have compiled some best practice Python code into a Jupyter notebook. It has helped me, so I thought it might help you, especially some of the new coders out there or veterans who can’t remember some NumPy or Pandas syntax. Below is the link. Enjoy!

2 Likes

Very thorough and clear! :slight_smile:

BTW you don’t need print as the last line of a cell. Also, you might want to look at python 3.6 format strings.

Awesome, thx :slight_smile:

Hey guys, this is not really related to part2, but I really want your opinion, I started a Reinforcement Learning series with @init_27, the idea is to cover the very basics of RL all the way to the state of the art, so far we only have 2 posts but that’s going to change soon :grin:

So anyways, here is it :slightly_smiling_face:

Any feedback is welcome!

1 Like

Hey guys, here is the part 2 of my tutorial of my blog post series “From deep learning papers implementation to shipping models into production”. Hope you’ll enjoy it :slight_smile:

7 Likes