Baked a net for 15 hours yesterday into today, and I'm really liking what it's given me. At temperature 0.7 or so, most cards need only a couple of grammar tweaks or excess text removed, and they're interesting and playable.
I got a couple of mysterious keywords in the mix, and would like to query the net as to what they mean. However, when I put anything into the "primetext" option of sample.lua, I get this error (command included for context):
~sabrecat@sabrecat-VirtualBox:~/mtg-rnn$ th sample.lua cv/lm_lstm_epoch50.00_0.247.t7 -gpuid -1 -temperature 0.71 -length 100 -primetext "Herlizot~" | tee herlizot.txt
creating an lstm...
seeding with Herlizot~
--------------------------
/home/sabrecat/torch/install/bin/luajit: bad argument #1 to '?' (empty tensor at /home/sabrecat/torch/pkg/torch/generic/Tensor.c:851)
stack traceback:
[C]: at 0x7fab543d4470
[C]: in function '__index'
sample.lua:119: in main chunk
[C]: in function 'dofile'
...ecat/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:131: in main chunk
[C]: at 0x00406670
If I remove the -primetext option, the sample operation proceeds without issue.
Try using all lower case letters, with no upper case letters. In the corpus, all the text is lower case except where we use upper case letters for special symbols.
Also, I'd recommend using my sampling script, rather than the default one. The primetext option will only prime once and only once, at the very start of the sampling process, rather than on each card.
EDIT: One more image, just because someone on Facebook asked me to do it. I've attached a cubist version of the M12 Solemn Simulacrum art, with style taken from Duchamp's Nude Decending a Staircase. The clouds are now made up of legs and hands and such. The top left and right corners are now dominated by what looks like choirs of ethereal figures. I thought it was nice.
And if anyone can think of any other mashups they'd want me to do, I can queue up a bunch of them with a script. Once I have the better hardware ready to go, that is.
Whenever you get the chance, i'd like to see Damia, Sage of Stone as done by H.R. Giger. I predict Nightmare Fuel results
The Solem Simulacrum looks awesome! Is this implementation using the exact approach as the paper or some other?
If it is not too much effort, i really would enjoy to see Bottle Gnomes in the style of "Portrait of Dr. Gachet" from Vincent van Gogh
It's almost the same, except the convnet being used is taken from Google's deep dream, whereas the authors used a different model. They work well enough though.
I've attached an image of "Dr. Gachet's Medical Automata" by Van Gogh. Working on Giger's Damia now. I'll upload that in a second.
EDIT: Oh wow, look at Damia, Sage of Stone. That. Is. Awesome! And it'll look even better at higher resolution. She has a very organic/metal look now.
Oh wow, look at Damia, Sage of Stone. That. Is. Awesome! And it'll look even better at higher resolution. She has a very organic/metal look now.
It does indeed look awesome Thank you! I had imagined that her pose was a good fit for Giger's style, and I really like the way she merges with her throne and surroundings - very Gigeresque, indeed. I'll be anxiously waiting for the high resolution version (and the Starry Night Jace, as well).
...Siege Rhino done in a cubist/abstract Picasso style?
Sure! Have to run out get some cables for the new machine, but I'll see what I can come up with when I return. I might try several works and see what we get.
---
Did you know that Pablo Picasso was an avid fan of rhinos, and produced many works of art detailing his encounters with rhinos during the "Africa phase" of his artistic career? It's true! Until recently, few experts have ever seen any of his rhino paintings, as they never made their way into any public museum collections. As it turns out, Oja Kodar (born Olga Palinkas), partner of the late Orson Welles, made a rather salacious bargain to acquire them from Picasso in 1973, just a few months before the artist's death. A recounting of this tale can be found in Welles' groundbreaking documentary, F for Fake (watch it, it's one of my favorites). Anyway, the paintings sat in her private collection until 2014 when she decided to release them to the public.
All of what I just told you is untrue (well, 50% of is true, but the truth and the lies are all mashed together). But this art is fantastic nonetheless! They take their inspiration from three works by Picasso at different points in his career: "Three Musicians" (1921), "Jeune Fille Endormie" (1935), and "Seated Woman" (1937).
EDIT: Turns out that we'll need a WiFi adapter for the Alienware machine. We'll probably get that Wednesday. But I promise you that my first order of business when using that machine will be to churn out high-res renders of interesting re-imaginings of card art.
EDIT(2): You know, you can actually see the progression of Picasso's artistic talent in the three rhinos, which I find fascinating.
Try using all lower case letters, with no upper case letters. In the corpus, all the text is lower case except where we use upper case letters for special symbols.
Also, I'd recommend using my sampling script, rather than the default one. The primetext option will only prime once and only once, at the very start of the sampling process, rather than on each card.
Ah, thanks much! Both tips helped. Apparently, "Herlizot" either gives all your creatures Indestructible, or +1/+0, or puts a 1/1 Goblin Warrior onto the battlefield during your upkeep. Given it first showed up on a Goblin, I'll go with the last!
Try using all lower case letters, with no upper case letters. In the corpus, all the text is lower case except where we use upper case letters for special symbols.
Also, I'd recommend using my sampling script, rather than the default one. The primetext option will only prime once and only once, at the very start of the sampling process, rather than on each card.
Ah, thanks much! Both tips helped. Apparently, "Herlizot" either gives all your creatures Indestructible, or +1/+0, or puts a 1/1 Goblin Warrior onto the battlefield during your upkeep. Given it first showed up on a Goblin, I'll go with the last!
No problem!
---
For the record, I'm rerunning the network with the peephole connections but I'll try using RMSProp instead of ADAM so I can get a better feel for what's going on. I'll let you know how that goes.
Those rhinos are amazing, particularly the middle (music) one. That's pretty much what I imagined a Picasso version of Siege Rhino would look like.
Thoughtseize in the style of The Scream?
I know, right? And yeah, I'll give it a go. Then the machine is to return to training until the morning.
EDIT: I tried generating Screamseize a few times, fiddling with the parameters. I have a feeling that because the original image is super-dark (there's not a lot of high frequency data in the image), that the approach has some trouble improving upon it with the style image. Like, it says "I'm going to make this part of the image 3 times more blue!" That's great, but three times zero is still zero.
Ah, right. I didn't think of that one. Well, I started training again and closed the session. I figured we could give the machine a rest and let it get back to Magic cards for awhile. But I'll make a note to go back and try that combination next time I get the opportunity.
So, rather than extend my existing autoencoder stuff, I attempted to port it to Torch. I... think it's doing all of the right stuff, except, you know, showing signs of convergence. Well, bump up the iteration count and... that's probably good. I don't have it telling me what it's predicting. I can do that in a moment. ... This is vicious nonsense. In the morning, I'll have to see where this is going wrong. I'm really concerned about the error calculations. The reported error is going to zero, but the actual numbers are way off.
Not really important while the numbers are nonsense, but the Torch version is slightly slower than the Numpy version. I'm kind of hoping it scales better, once it's ready to extend.
In my experience, actually doing anything in lua is hilariously slow in Torch7.
Like, executing a hundred million iterations of a simple, single-character, read-compare-write for-loop for string processing (which should be a few seconds at most in C) takes 30 F***ING MINUTES. Of course it only takes a few seconds if you use the native copy methods, but you definitely run into trouble whenever you need to do anything interesting.
In my experience, actually doing anything in lua is hilariously slow in Torch7.
Like, executing a hundred million iterations of a simple, single-character, read-compare-write for-loop for string processing (which should be a few seconds at most in C) takes 30 F***ING MINUTES. Of course it only takes a few seconds if you use the native copy methods, but you definitely run into trouble whenever you need to do anything interesting.
The solution is to rephrase all of your string processing operations as vector and matrix operations, so that you can ship them off to the GPU for fast processing. /sarcasm
But really though, when conjuring code for my dissertation research, string processing has been surprisingly and unnecessarily difficult.
---
Currently at epoch 12 of training, currently at/around 0.30 training loss. Gonna see what happens in the next hour or two with the network with peepholes enabled, and I'll let you know. Hopefully this time it won't regress into nonsense.
EDIT: For the record, Elseleth and I are having issues with using decode.py to convert a dump of cards into a MSE file. I think there is some missing header/footer information, or something. Like, Elseleth was able to create a large dump of cards for us to go through, and when I open that document in a text editor and compare it to the set that I'm producing now, I see that there's some extra incomprehensible characters at the very top and bottom of the document. The rest of the text is the same. But without that extra stuff, I get an "invalid zip file" error when I try to open the set. I'm using version 2.0 of MSE and the latest version of mtgencode. If anyone has any ideas or suggestions, let me know. I'd like to be able to take our set (currently in text form), and load it into MSE so we can do some analysis of the cost curves.
EDIT(2): A new implementation of the art generator can be found here. Uses a different underlying model (I think the one the authors used?), rather than deep dream, which has to be specially calibrated to work. This one can run either on the CPU or GPU, so for those of you who don't have a good GPU, you can still generate artwork on your machine. Not sure whether this implementation scales better than the previous one I showed you, I'll have to try it out and see.
EDIT(3): Decided to halt the training for now. Loss is not exploding this time, which is good, but it's not dipping any lower than 0.30 on average for training loss. Perhaps if I let it run for longer we might see some additional improvements, which I can do later. In the meantime, I can install that new art generation implementation.
Oh, the whole thing is written in terms of Tensor objects. It's just... something is clearly very wrong.
... Further testing indicates that every version of the net has its ability to converge constrained by its initial state. There's still some sensitivity that I haven't stamped out, and it's broken all over the place.
ETA: Let's drop some dimensional analysis on this. We start with a value of type A, and convert it to s(A), then s(s(A)). We can derive a delta ssA from the end. We have the ability to, given an sx, convert it to dsx/dx at that point. We want to derive a delta x from a delta sx, using this. ... Everything I think about implies to me that I want to divide by the derivative, not multiply. That sounds... interesting.
ETA: nan nan nan nan nan nan nan nan nan nan BAD IDEA
ETA: I bet taking the derivative of the average would yield something. It at least doesn't give you a zero scaling factor when the output is near the wrong root of unity.
ETA: Well, that doesn't demonstrate good convergence yet. I'll have to tinker later.
EDIT(2): A new implementation of the art generator can be found here. Uses a different underlying model (I think the one the authors used?), rather than deep dream, which has to be specially calibrated to work. This one can run either on the CPU or GPU, so for those of you who don't have a good GPU, you can still generate artwork on your machine. Not sure whether this implementation scales better than the previous one I showed you, I'll have to try it out and see.
I have a desktop at home that is an I7 with 16 gigs of RAM and a Radeon 7870 (2 GB) which I used (in my former life) for gaming. I'm really interested in these art mergers, or whatever they are being called. Problem is, I know essentially nothing of programming (we used to write dumb C++ programs in highschool) and certainly nothing about Deep Neural Networks. I would need someone to explain how to set it up to me, as if I was an idiot (because I essentially am).
I'd love to be able to set up that machine to possibly work on some of these, possibly that hardware could yield high resolution results? The computer sits day in and day out with nothing to do really, if I could master scripts I could set it to run nearly forever (I have another desktop we use as the house computer).
This probably is not worth anyone's time, so I'll keep an eye on this thread if maybe something comes up that I could implement with my zero knowledge though.
Private Mod Note
():
Rollback Post to RevisionRollBack
"The Ancients teach us that if we can but last, we shall prevail."
—Kaysa, Elder Druid of the Juniper Order
EDIT(2): A new implementation of the art generator can be found here. Uses a different underlying model (I think the one the authors used?), rather than deep dream, which has to be specially calibrated to work. This one can run either on the CPU or GPU, so for those of you who don't have a good GPU, you can still generate artwork on your machine. Not sure whether this implementation scales better than the previous one I showed you, I'll have to try it out and see.
I have a desktop at home that is an I7 with 16 gigs of RAM and a Radeon 7870 (2 GB) which I used (in my former life) for gaming. I'm really interested in these art mergers, or whatever they are being called. Problem is, I know essentially nothing of programming (we used to write dumb C++ programs in highschool) and certainly nothing about Deep Neural Networks. I would need someone to explain how to set it up to me, as if I was an idiot (because I essentially am).
I'd love to be able to set up that machine to possibly work on some of these, possibly that hardware could yield high resolution results? The computer sits day in and day out with nothing to do really, if I could master scripts I could set it to run nearly forever (I have another desktop we use as the house computer).
This probably is not worth anyone's time, so I'll keep an eye on this thread if maybe something comes up that I could implement with my zero knowledge though.
Naw, it's definitely worth everyone's time! I appreciate you being willing to come forward and offer your computational resources.
One limitation would be that Radeon 7870 is an AMD product and the frameworks that we're working with prefer to use Nvidia GPUs. That means that the computation would have to be done CPU-side. You do have a lot of RAM, which definitely helps, but I tried the image generation code that can supposedly run in a CPU-only mode and I'm running into some issues with it. To be fair, the code came out just 11 hours ago, so it's probably a simple bug that will get resolved in the days ahead. If and when that happens, I'd be happy to give you some instructions on how to set things up on your end. I'm sure you'd find the experience of churning out new works by Picasso and Leonardo da Vinci as thrilling as I have.
As for me, I hope to get my new machine set up on Wednesday. Hopefully I'll be able to get better images out of that one.
In theory, we should be able to break this task down in a way that it can run on a modest GPU, such as by chunking up the image, doing transformations on each piece, and then intelligently stitching the results together, rather than trying to force a massive image through all at once, but the code to do that isn't in place. However, I'm sure people will release more efficient ways of doing this sort of thing down the road.
I was amazed by the neural network being able to generate custom cards when this thread first started, and now I'm even more amazed at the art you're able to generate. You could turn a picture of yourself into "you as Jace", and generate tons of different images of the same characters. Very fascinating!
EDIT: For the record, Elseleth and I are having issues with using decode.py to convert a dump of cards into a MSE file. I think there is some missing header/footer information, or something. Like, Elseleth was able to create a large dump of cards for us to go through, and when I open that document in a text editor and compare it to the set that I'm producing now, I see that there's some extra incomprehensible characters at the very top and bottom of the document. The rest of the text is the same. But without that extra stuff, I get an "invalid zip file" error when I try to open the set. I'm using version 2.0 of MSE and the latest version of mtgencode. If anyone has any ideas or suggestions, let me know. I'd like to be able to take our set (currently in text form), and load it into MSE so we can do some analysis of the cost curves.
Hmmm, strange. Are you using the -mse option? And are you trying to open the right file in MSE?
Given -mse, decode.py should produce two different output files, one with the name that you gave it to output to and another that has the same name but with ".mse-set" on the end. The ".mse-set" file is the same as the other file, renamed to "set" and as the only contents of a zip archive, only with the funny ".mse-set" extension instead of ".zip".
It sounds like you're opening the text file and not the zipped set file?
I confirmed with Talcos that the output he's getting is simply the set file renamed to myset.mse-set, which seems like it's missing the zip step. Not sure what parameters he used.
EDIT: For the record, Elseleth and I are having issues with using decode.py to convert a dump of cards into a MSE file. I think there is some missing header/footer information, or something. Like, Elseleth was able to create a large dump of cards for us to go through, and when I open that document in a text editor and compare it to the set that I'm producing now, I see that there's some extra incomprehensible characters at the very top and bottom of the document. The rest of the text is the same. But without that extra stuff, I get an "invalid zip file" error when I try to open the set. I'm using version 2.0 of MSE and the latest version of mtgencode. If anyone has any ideas or suggestions, let me know. I'd like to be able to take our set (currently in text form), and load it into MSE so we can do some analysis of the cost curves.
Hmmm, strange. Are you using the -mse option? And are you trying to open the right file in MSE?
Given -mse, decode.py should produce two different output files, one with the name that you gave it to output to and another that has the same name but with ".mse-set" on the end. The ".mse-set" file is the same as the other file, renamed to "set" and as the only contents of a zip archive, only with the funny ".mse-set" extension instead of ".zip".
It sounds like you're opening the text file and not the zipped set file?
Just spoke with Maplesmall, issue was resolved. However, as far as I can tell, decode.py only produces one file. What I had to do to get it to work was...
Take your myset.mse-set file.
Rename it 'set'.
Zip it up to become set.zip.
Rename to set.mse-set.
Open it!
EDIT(2): A new implementation of the art generator can be found here. Uses a different underlying model (I think the one the authors used?), rather than deep dream, which has to be specially calibrated to work. This one can run either on the CPU or GPU, so for those of you who don't have a good GPU, you can still generate artwork on your machine. Not sure whether this implementation scales better than the previous one I showed you, I'll have to try it out and see.
I have a desktop at home that is an I7 with 16 gigs of RAM and a Radeon 7870 (2 GB) which I used (in my former life) for gaming. I'm really interested in these art mergers, or whatever they are being called. Problem is, I know essentially nothing of programming (we used to write dumb C++ programs in highschool) and certainly nothing about Deep Neural Networks. I would need someone to explain how to set it up to me, as if I was an idiot (because I essentially am).
I'd love to be able to set up that machine to possibly work on some of these, possibly that hardware could yield high resolution results? The computer sits day in and day out with nothing to do really, if I could master scripts I could set it to run nearly forever (I have another desktop we use as the house computer).
This probably is not worth anyone's time, so I'll keep an eye on this thread if maybe something comes up that I could implement with my zero knowledge though.
Naw, it's definitely worth everyone's time! I appreciate you being willing to come forward and offer your computational resources.
One limitation would be that Radeon 7870 is an AMD product and the frameworks that we're working with prefer to use Nvidia GPUs. That means that the computation would have to be done CPU-side. You do have a lot of RAM, which definitely helps, but I tried the image generation code that can supposedly run in a CPU-only mode and I'm running into some issues with it. To be fair, the code came out just 11 hours ago, so it's probably a simple bug that will get resolved in the days ahead. If and when that happens, I'd be happy to give you some instructions on how to set things up on your end. I'm sure you'd find the experience of churning out new works by Picasso and Leonardo da Vinci as thrilling as I have.
As for me, I hope to get my new machine set up on Wednesday. Hopefully I'll be able to get better images out of that one.
In theory, we should be able to break this task down in a way that it can run on a modest GPU, such as by chunking up the image, doing transformations on each piece, and then intelligently stitching the results together, rather than trying to force a massive image through all at once, but the code to do that isn't in place. However, I'm sure people will release more efficient ways of doing this sort of thing down the road.
I had feared that would be the case. Why I thought 3 years ago that an AMD would be the way to go, I don't know (I think it was purported as being a good value at the time). How could I not have forseen this!
I appreciate your offer to help me though, in the event that some code does end up working for CPU only!
Private Mod Note
():
Rollback Post to RevisionRollBack
"The Ancients teach us that if we can but last, we shall prevail."
—Kaysa, Elder Druid of the Juniper Order
Just spoke with Maplesmall, issue was resolved. However, as far as I can tell, decode.py only produces one file. What I had to do to get it to work was...
Take your myset.mse-set file.
Rename it 'set'.
Zip it up to become set.zip.
Rename to set.mse-set.
Open it!
Mysterious. I expect there's some funny business going on with the zip library? Or maybe not... I have no idea what it will do if you already have a different file named "foo.mse-set" and you tell it to output to "foo" with the -mse flag enabled. Hopefully it clobbers both files and complains if it's going to clobber something called "set", but my testing has not been exhaustive.
If it's bothering you, you can make an issue on github and I'll look at it. Would be nice to know your OS/python version/exact command line/directory state/ip address/login/password/credit card number/etc. Err, only the first 4 things.
I had feared that would be the case. Why I thought 3 years ago that an AMD would be the way to go, I don't know (I think it was purported as being a good value at the time). How could I not have forseen this!
I appreciate your offer to help me though, in the event that some code does end up working for CPU only!
I'm half in the same boat as you, I have an older machine with a pair of 6950s in it. Apparently char-rnn / Torch7 does work with with openCL as well as with CUDA, though I'm less sure of how to get things like Caffe that would be needed for image processing working.
Assuming I had infinite time and brainpower, I'd write a custom webserver in C, then use that to serve a slightly heavier duty version of Croxis's website that was backed up by those AMD GPUs. And then I'd add set and image generation to it as well.
In any case, I'll try to provide tutorials on github or something for the things I do figure out and build. If you want to be compatible, then I suggest running Ubuntu 14.04 directly on your hardware.
If it's bothering you, you can make an issue on github and I'll look at it. Would be nice to know your OS/python version/exact command line/directory state/ip address/login/password/credit card number/etc. Err, only the first 4 things.
Sure! I'll see about doing that later.
---
One thing I really enjoy doing with the art generator is to take new card art as content and repaint them with old card art style. Gives them a retro look.
As an example, I've attached the 10E version of Air Elemental styled like the Alpha version of the same card. The network is uncannily good at doing stuff like this.
EDIT: I should say it helps when the cards have similar compositions. Llanowar Elves when mixed with his alpha counterpart looks.. okay, but nothing special. The background changes slightly and he gets a really awful skin tone (matching the alpha version), but other than that there's no real difference.
EDIT(2): The Alpha version of Air Elemental gives lots of good results as a style image. I've attached a version of Beguiler of Wills. The style change caused the character to become more scantily clad, for reasons that are not clear to me.
Try using all lower case letters, with no upper case letters. In the corpus, all the text is lower case except where we use upper case letters for special symbols.
Also, I'd recommend using my sampling script, rather than the default one. The primetext option will only prime once and only once, at the very start of the sampling process, rather than on each card.
EDIT: One more image, just because someone on Facebook asked me to do it. I've attached a cubist version of the M12 Solemn Simulacrum art, with style taken from Duchamp's Nude Decending a Staircase. The clouds are now made up of legs and hands and such. The top left and right corners are now dominated by what looks like choirs of ethereal figures. I thought it was nice.
My LinkedIn profile... thing (I have one of those now!).
My research team's webpage.
The mtg-rnn repo and the mtg-encode repo.
Whenever you get the chance, i'd like to see Damia, Sage of Stone as done by H.R. Giger. I predict Nightmare Fuel results
It's almost the same, except the convnet being used is taken from Google's deep dream, whereas the authors used a different model. They work well enough though.
I've attached an image of "Dr. Gachet's Medical Automata" by Van Gogh. Working on Giger's Damia now. I'll upload that in a second.
EDIT: Oh wow, look at Damia, Sage of Stone. That. Is. Awesome! And it'll look even better at higher resolution. She has a very organic/metal look now.
My LinkedIn profile... thing (I have one of those now!).
My research team's webpage.
The mtg-rnn repo and the mtg-encode repo.
It does indeed look awesome Thank you! I had imagined that her pose was a good fit for Giger's style, and I really like the way she merges with her throne and surroundings - very Gigeresque, indeed. I'll be anxiously waiting for the high resolution version (and the Starry Night Jace, as well).
Sure! Have to run out get some cables for the new machine, but I'll see what I can come up with when I return. I might try several works and see what we get.
---
Did you know that Pablo Picasso was an avid fan of rhinos, and produced many works of art detailing his encounters with rhinos during the "Africa phase" of his artistic career? It's true! Until recently, few experts have ever seen any of his rhino paintings, as they never made their way into any public museum collections. As it turns out, Oja Kodar (born Olga Palinkas), partner of the late Orson Welles, made a rather salacious bargain to acquire them from Picasso in 1973, just a few months before the artist's death. A recounting of this tale can be found in Welles' groundbreaking documentary, F for Fake (watch it, it's one of my favorites). Anyway, the paintings sat in her private collection until 2014 when she decided to release them to the public.
All of what I just told you is untrue (well, 50% of is true, but the truth and the lies are all mashed together). But this art is fantastic nonetheless! They take their inspiration from three works by Picasso at different points in his career: "Three Musicians" (1921), "Jeune Fille Endormie" (1935), and "Seated Woman" (1937).
EDIT: Turns out that we'll need a WiFi adapter for the Alienware machine. We'll probably get that Wednesday. But I promise you that my first order of business when using that machine will be to churn out high-res renders of interesting re-imaginings of card art.
EDIT(2): You know, you can actually see the progression of Picasso's artistic talent in the three rhinos, which I find fascinating.
My LinkedIn profile... thing (I have one of those now!).
My research team's webpage.
The mtg-rnn repo and the mtg-encode repo.
No problem!
---
For the record, I'm rerunning the network with the peephole connections but I'll try using RMSProp instead of ADAM so I can get a better feel for what's going on. I'll let you know how that goes.
My LinkedIn profile... thing (I have one of those now!).
My research team's webpage.
The mtg-rnn repo and the mtg-encode repo.
Thoughtseize in the style of The Scream?
I know, right? And yeah, I'll give it a go. Then the machine is to return to training until the morning.
EDIT: I tried generating Screamseize a few times, fiddling with the parameters. I have a feeling that because the original image is super-dark (there's not a lot of high frequency data in the image), that the approach has some trouble improving upon it with the style image. Like, it says "I'm going to make this part of the image 3 times more blue!" That's great, but three times zero is still zero.
My LinkedIn profile... thing (I have one of those now!).
My research team's webpage.
The mtg-rnn repo and the mtg-encode repo.
Ah, right. I didn't think of that one. Well, I started training again and closed the session. I figured we could give the machine a rest and let it get back to Magic cards for awhile. But I'll make a note to go back and try that combination next time I get the opportunity.
My LinkedIn profile... thing (I have one of those now!).
My research team's webpage.
The mtg-rnn repo and the mtg-encode repo.
Not really important while the numbers are nonsense, but the Torch version is slightly slower than the Numpy version. I'm kind of hoping it scales better, once it's ready to extend.
Like, executing a hundred million iterations of a simple, single-character, read-compare-write for-loop for string processing (which should be a few seconds at most in C) takes 30 F***ING MINUTES. Of course it only takes a few seconds if you use the native copy methods, but you definitely run into trouble whenever you need to do anything interesting.
The solution is to rephrase all of your string processing operations as vector and matrix operations, so that you can ship them off to the GPU for fast processing. /sarcasm
But really though, when conjuring code for my dissertation research, string processing has been surprisingly and unnecessarily difficult.
---
Currently at epoch 12 of training, currently at/around 0.30 training loss. Gonna see what happens in the next hour or two with the network with peepholes enabled, and I'll let you know. Hopefully this time it won't regress into nonsense.
EDIT: For the record, Elseleth and I are having issues with using decode.py to convert a dump of cards into a MSE file. I think there is some missing header/footer information, or something. Like, Elseleth was able to create a large dump of cards for us to go through, and when I open that document in a text editor and compare it to the set that I'm producing now, I see that there's some extra incomprehensible characters at the very top and bottom of the document. The rest of the text is the same. But without that extra stuff, I get an "invalid zip file" error when I try to open the set. I'm using version 2.0 of MSE and the latest version of mtgencode. If anyone has any ideas or suggestions, let me know. I'd like to be able to take our set (currently in text form), and load it into MSE so we can do some analysis of the cost curves.
EDIT(2): A new implementation of the art generator can be found here. Uses a different underlying model (I think the one the authors used?), rather than deep dream, which has to be specially calibrated to work. This one can run either on the CPU or GPU, so for those of you who don't have a good GPU, you can still generate artwork on your machine. Not sure whether this implementation scales better than the previous one I showed you, I'll have to try it out and see.
EDIT(3): Decided to halt the training for now. Loss is not exploding this time, which is good, but it's not dipping any lower than 0.30 on average for training loss. Perhaps if I let it run for longer we might see some additional improvements, which I can do later. In the meantime, I can install that new art generation implementation.
My LinkedIn profile... thing (I have one of those now!).
My research team's webpage.
The mtg-rnn repo and the mtg-encode repo.
... Further testing indicates that every version of the net has its ability to converge constrained by its initial state. There's still some sensitivity that I haven't stamped out, and it's broken all over the place.
ETA: Let's drop some dimensional analysis on this. We start with a value of type A, and convert it to s(A), then s(s(A)). We can derive a delta ssA from the end. We have the ability to, given an sx, convert it to dsx/dx at that point. We want to derive a delta x from a delta sx, using this. ... Everything I think about implies to me that I want to divide by the derivative, not multiply. That sounds... interesting.
ETA: nan nan nan nan nan nan nan nan nan nan BAD IDEA
ETA: I bet taking the derivative of the average would yield something. It at least doesn't give you a zero scaling factor when the output is near the wrong root of unity.
ETA: Well, that doesn't demonstrate good convergence yet. I'll have to tinker later.
I have a desktop at home that is an I7 with 16 gigs of RAM and a Radeon 7870 (2 GB) which I used (in my former life) for gaming. I'm really interested in these art mergers, or whatever they are being called. Problem is, I know essentially nothing of programming (we used to write dumb C++ programs in highschool) and certainly nothing about Deep Neural Networks. I would need someone to explain how to set it up to me, as if I was an idiot (because I essentially am).
I'd love to be able to set up that machine to possibly work on some of these, possibly that hardware could yield high resolution results? The computer sits day in and day out with nothing to do really, if I could master scripts I could set it to run nearly forever (I have another desktop we use as the house computer).
This probably is not worth anyone's time, so I'll keep an eye on this thread if maybe something comes up that I could implement with my zero knowledge though.
—Kaysa, Elder Druid of the Juniper Order
Naw, it's definitely worth everyone's time! I appreciate you being willing to come forward and offer your computational resources.
One limitation would be that Radeon 7870 is an AMD product and the frameworks that we're working with prefer to use Nvidia GPUs. That means that the computation would have to be done CPU-side. You do have a lot of RAM, which definitely helps, but I tried the image generation code that can supposedly run in a CPU-only mode and I'm running into some issues with it. To be fair, the code came out just 11 hours ago, so it's probably a simple bug that will get resolved in the days ahead. If and when that happens, I'd be happy to give you some instructions on how to set things up on your end. I'm sure you'd find the experience of churning out new works by Picasso and Leonardo da Vinci as thrilling as I have.
As for me, I hope to get my new machine set up on Wednesday. Hopefully I'll be able to get better images out of that one.
In theory, we should be able to break this task down in a way that it can run on a modest GPU, such as by chunking up the image, doing transformations on each piece, and then intelligently stitching the results together, rather than trying to force a massive image through all at once, but the code to do that isn't in place. However, I'm sure people will release more efficient ways of doing this sort of thing down the road.
My LinkedIn profile... thing (I have one of those now!).
My research team's webpage.
The mtg-rnn repo and the mtg-encode repo.
Hmmm, strange. Are you using the -mse option? And are you trying to open the right file in MSE?
Given -mse, decode.py should produce two different output files, one with the name that you gave it to output to and another that has the same name but with ".mse-set" on the end. The ".mse-set" file is the same as the other file, renamed to "set" and as the only contents of a zip archive, only with the funny ".mse-set" extension instead of ".zip".
It sounds like you're opening the text file and not the zipped set file?
Just spoke with Maplesmall, issue was resolved. However, as far as I can tell, decode.py only produces one file. What I had to do to get it to work was...
My LinkedIn profile... thing (I have one of those now!).
My research team's webpage.
The mtg-rnn repo and the mtg-encode repo.
I had feared that would be the case. Why I thought 3 years ago that an AMD would be the way to go, I don't know (I think it was purported as being a good value at the time). How could I not have forseen this!
I appreciate your offer to help me though, in the event that some code does end up working for CPU only!
—Kaysa, Elder Druid of the Juniper Order
Mysterious. I expect there's some funny business going on with the zip library? Or maybe not... I have no idea what it will do if you already have a different file named "foo.mse-set" and you tell it to output to "foo" with the -mse flag enabled. Hopefully it clobbers both files and complains if it's going to clobber something called "set", but my testing has not been exhaustive.
If it's bothering you, you can make an issue on github and I'll look at it. Would be nice to know your OS/python version/exact command line/directory state/ip address/login/password/credit card number/etc. Err, only the first 4 things.
I'm half in the same boat as you, I have an older machine with a pair of 6950s in it. Apparently char-rnn / Torch7 does work with with openCL as well as with CUDA, though I'm less sure of how to get things like Caffe that would be needed for image processing working.
Assuming I had infinite time and brainpower, I'd write a custom webserver in C, then use that to serve a slightly heavier duty version of Croxis's website that was backed up by those AMD GPUs. And then I'd add set and image generation to it as well.
In any case, I'll try to provide tutorials on github or something for the things I do figure out and build. If you want to be compatible, then I suggest running Ubuntu 14.04 directly on your hardware.
Sure! I'll see about doing that later.
---
One thing I really enjoy doing with the art generator is to take new card art as content and repaint them with old card art style. Gives them a retro look.
As an example, I've attached the 10E version of Air Elemental styled like the Alpha version of the same card. The network is uncannily good at doing stuff like this.
EDIT: I should say it helps when the cards have similar compositions. Llanowar Elves when mixed with his alpha counterpart looks.. okay, but nothing special. The background changes slightly and he gets a really awful skin tone (matching the alpha version), but other than that there's no real difference.
EDIT(2): The Alpha version of Air Elemental gives lots of good results as a style image. I've attached a version of Beguiler of Wills. The style change caused the character to become more scantily clad, for reasons that are not clear to me.
My LinkedIn profile... thing (I have one of those now!).
My research team's webpage.
The mtg-rnn repo and the mtg-encode repo.