Open EmbraceLife opened 7 years ago
I'm not certain what you mean by, "It seems to me that I can't access each layer's output directly, such as logits of each model below.... Is there a way to access each layer's output directly with kur?" What does "directly" mean? You can reference other layers by name, and you can cause any layer to be outputted as part of the model output.
I think the bigger question is multi-modal architectures, like GANs. These are not currently supported in Kur, but is something on the horizon that I've been thinking about adding. Your Kurfile is logically consistent, I think, and stylistically good, but it isn't a valid Kurfile because, well, Kur doesn't support multiple models.
P.S. When to use "-" or not is a YAML thing. If you indent and use "-", you are starting a list:
grocery_list:
- apples
- oranges
If you indent without using "-", you are starting a map/dictionary/key-value pairs:
movie_ratings:
harry_potter: good
twilight: bad
You can nest these things: you can have list items which are dictionaries, you have dictionaries whose values are lists, you can have dictionaries whose values are dictionaries, you can have list items which are themselves lists, etc. If you are ever in doubt, look at the YAML spec or, if you are more comfortable in JSON, just use JSON Kurfiles or a YAML/JSON converter to see what is going on.
I want to convert a gan_mnist in tensorflow to gan_mnist in kur.
At this moment, all I know about model in kur is the following: model's life cycle:
It seems to me that I can't access each layer's output directly, such as logits of each model below. I hope I am wrong. Is there a way to access each layer's output directly with kur? or can I write some additional functions in kur to access outputs of each layer of the models?
Another difficulty I have is to write the models in kurfile. Is the kurfile below make sense or valid in logic and style? I prefer kurfile over using kur api directly, but I don't know what to put in kurfile a lot of times. At the moment, I am confused about when to use
-
, and when not to use-
, I have marked the place where I am particularly confused with????
.There are two sections below: 1. parts of kurfile; 2. corresponding parts in tensorflow
Section1: some key sections of gan_mnist pseudo-kurfile
How would you write this gan-kurfile? I would like to see what this gan kurfile would look like (it needs not to be working code, I just want to see the proper pseudo kurfile you may write)
Section2 is the key parts (d_model, g_model, losses, optimizers ... ) in tensorflow below
Inputs for generator and discriminator
Generator model
Discriminator model
Hyperparameters
Build network
Calculate losses
Optimizers