Adding adversarial loss (Conditional GANs) to CNN - deep-learning

Wanted to do something like this - http://scribbler.eye.gatech.edu/paper.pdf. could someone point me to working model for this? They have mentioned building on (https://github.com/TengdaHan/Convolutional_Sketch_Inversion). However, I do not have much experience with GANs and do not know how to adapt a normal CNN to a GAN. Any help with this would be greatly appreciated too.
Also, they have mentioned using skip layers(residual layers), but I can find no indication of their connections(architecture).
From the figure given in the paper, I cannot make out where the Generator is or where the Discriminator is.
In short, I do not know how to hook up a GAN to CNN. Any help with this would be greatly appreciated.

Related

how to train and test a deep learning model on github with my dataset?

I am trying to train and test the VQA model on https://github.com/akirafukui/vqa-mcb with my own dataset.
I learned a deeplearning unit at Uni, but I still don't know how to make use of the model in my code. Also, I don't understand the Prerequisites section in readme.
Could you please give me some directions or useful resources on the web? Thank you very much!

How to extract relation between entities for stock prediction

I am trying to extract relation between two entities (entity1- relation- entity2) from news articles for stock prediction. I have used NER for entity extraction. It would be great if anyone could help me with relationship extraction.
Relation Extraction is a difficult task in NLP and most of the time there's not a one-size-fits-all solution to that. Depending on the task that you're trying to solve, I would suggest reading some literature about it on Google Scholar and see if there's something similar to what you're trying to do.
Sometimes, authors are kind enough to publish the code of their solution, which are mainly PyTorch/Tensorflow models (hopefully) trained on a specific dataset. One example is this paper.
If you want to stick with Spacy, there are some guides that might help you, but I'm not sure how well it could scale with the task that you need to solve.
Another more basic approach could be to just extract the shortest path between two entities in the semantic graph of a sentence. This might be quite limited, but can be fairly easy to implement.
One final idea that comes to mind is to use encoders and compute the similarity between sentences. If you're doing multi-class classification, this could help solving your problem.
Hope you find something useful among these.

Where to find deep learning based prediction model

I need to find a deep learning based prediction model, where can I find it?
You can use Pytorch and Tensorflow pretrained models.
https://pytorch.org/docs/stable/torchvision/models.html
They can be automatically downloaded. There are some sample codes, that you can try:
https://pytorch.org/tutorials/beginner/blitz/cifar10_tutorial.html#sphx-glr-beginner-blitz-cifar10-tutorial-py
If you are interested in deep learning, I suggest you review the basics of it in cs231n stanford. Your question is a bit odd, because you first need to define your task specifically. Prediction is not a good description. You could look for models for classification, segmentation, object detection, sequence2sequence(like translation), and so on...
Then you need to know how to search through projects on github, and then you need to know python (in most cases), and then use a pretrained model or use your own dataset to train or fine-tune the model for that task. Then you could pray that you have found a good model for your task, after that you need to validate the results on a test set. However, implementation of a model for real-life scenarios is another thing that you need to consider many other things, and you usually need some online-learning strategy, like Federated Learning. I hope that I could help you.

GRU in DeepLearning4J

I am trying to find a GRU implementation within DeepLearning4J but cannot seem to find one. Does anyone know if GRU's are implemented within DL4J? If so can you please direct me to an example. If not, is this on their roadmap anywhere?
Thanks
You can't find one because there isn't one. It's not on our roadmap because it doesn't have a clear ROI compared to LSTMs.
We have both LSTMs and Bidirectional.
In general, we've only needed one and people have bene satisfied with that.

Graph interpretation deep learning

i'm trying to build a model that classify sentences. i'm using a Reccurent neural network(RNN) model "GRUcell" and i have the following Graph. the loss function i'm using is cross entropy.
can you please explain me why the loss after been close to 0 pick to 1 after each iterations?
i can't find any interpretation of this, thank you.
enter image description here
According to the information you have provided it looks like its going down at the end of a batch and again going back up at the start of the next batch. This can be due to a high learning rate with not enough decay over time.
Try to tweak the parameters and see if that helps.
Cheers