How to draw control flow graph fro this code or question? - testing

I didn't understand how to proceed with the numbers and continous Do's.

Related

predict the position of an image in another image [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
If one image is a part of another image, then how to compute the accurate location in deep learning way?
Now I could compute this by extracting and matching key points using OpenCV, but I hope to solve it with neural networks.
Any ideas to design the networks and loss functions?
Thanks very much.
This is a detection problem. The simplest approach to do it is to create a a network with two heads, one for classification and the other for the bounding box (regression).
you feed your network with the image and respective label, and sum the lossess and do a backward. train for some epochs and you'll get your self a detection model that you can use to detect what you need. but its just a simple approach and it can get much more complex.
You may as well skip this and use an existing detection architecture or better framework which simplifies your life much better.
For Tensorflow I belive you can use ObjectDetctionAPI and for Pytorch you can use Detectron, Detectron2, mmdetection among others.

why can't I reimplement my tensorflow model with pytorch? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 3 years ago.
Improve this question
I am developing a model in tensorflow and find that it is good on my specific evaluation method. But when I transfer to pytorch, I can't achieve the same results. I have checked the model architecture, the weight init method, the lr schedule, the weight decay, momentum and epsilon used in BN layer, the optimizer, and the data preprocessing. All things are the same. But I can't get the same results as in tensorflow. Anybody have met the same problem?
I did a similar conversion recently.
First you need to make sure that the forward path produces the same results: disable all randomness, initialize with the same values, give it a very small input and compare. If there is a discrepancy, disable parts of the network and compare enabling layers one by one.
When the forward path is confirmed, check the loss, gradients, and updates after one forward-backward cycle.

How to get all the weight updates from Word2Vec [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I am not only interested in the final W0 and W1 (also, to some known as W and W'), but all the variations of these two matrices during the learning.
For now, I am using the gensim implementation, but compared to sklearn, gensim's API is not very well organized in my mind. Hence, I am open to moving to tf if need be, given that getting access to these values would be possible/easier.
I know I can hack the main code; my question is whether there already is a function/variable for it.
There's no specific API for seeing individual training example updates, or interim weights mid-training.
But as you've intuited, instead of calling train() once, letting it run all epochs and all learning-rate-updates (as is recommended), you could call it one epoch at a time, providing it the right incremental start_alpha and end_alpha yourself each call, and between the calls look at the word-vectors (aka "projection weights") and hidden-to-output weights (syn1neg for default negative-sampling, or syn1 for hierarchical-softmax).
If you needed more fine-grained reporting, you'd need to modify the source code to add the extra logging/callouts/etc you need.

Make wordard in vb6 [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
How would I be able to make a program like words WORDART that has 3d text and text effects? Would I need pictures for each letter with the cool effects of is there a different way to to it?
That seems like a good idea to have pictures for each letter or number but that's a lot of pictures for capital letters and regular letters, you also would have to load each file which can take some time, so it doesn't sound so practical to do. A better option would be to make a user control that makes a picture at run time with the word art in it wand has the cool effects, a example is here
http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=70216&lngWId=1
aanother example is at http://www.xtremevbtalk.com/word-powerpoint-outlook-and-other-office-products/101964-import-ms-word-art-object-visual-basic.html

VB.NET Key Pressing? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I'm trying to make a simple background program that runs in the background using VB.NET to change anything I type to a hexadecimal value. For example, if I'm writing an email and I press "h" then it would erase the "h" and replace it with it's hexadecimal value(h's is 68). I have no clue how to do this could someone please explain?
Yes, you're looking for the Asc() and AscW() functions in Visual Basic. Combine that with String.Format() to display the number as a hexadecimal value, and key it all off a keypress event of some kind.
For best results, stick with WinForms over WPF for such an app.
If what you want is to make the thing run in the background over literally everything you may be out of luck; Windows' process separation and message passing systems will get completely in your way.