Added trainer
Adaptation for generator interface Added generation of CNNTrainer. Changed version in pom. Changed package. Fix freemarker template loading. Inherit get-functions for Training parameters.
Merge request reports
Activity
added 1 commit
- ce8f15af - Updated pom. cnn-arch version back to 0.2.1-SNAPSHOT
assigned to @svetlana.pavlitskaya
Carlos has moved the Training generator from the Train Language to here.
Could you please review the changes. The review has two aims:
- It increases code quality
- You are aware of the changes and can adapt your code to the new version
if you find issues which you think should be changed before the merge, please comment the respective line under "changes" or comment here. Once you are done, please assign the merge request back to @carlos.alfredo.yeverino (only if something needs to be changed) or to me (for further discussion or if you agree with all the changes, for a merge)
@svetlana.pavlitskaya Carlos also adapted EMADL2CPP which will be merged into master once this MR is done
Edited by Evgeny KusmenkoHi @carlos.alfredo.yeverino , @kusmenko
I need to postpone this merge request for another day. The reason is it uses old versions of both cnn-train and cnn-arch. Also I don't get the tests passed. I suggest that I first finish migrating cnn-arch to monticore 5.0.0. @carlos.alfredo.yeverino I will then assign this merge request back to you so that you can switch to newer versions.
thank you, @svetlana.pavlitskaya
@carlos.alfredo.yeverino You can now switch to newer version of CNNTrainLang and CNNArchLang (both 0.2.3-SNAPSHOT).
I think you first need to merge master into your branch because master contains commits that your branch doesn't (like adding eval_metric to Creator template). See this graph https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/CNNArch2MXNet/network/master
Also, eval_metric parameter is missing in CNNTrainer template. See the last CNNTrainLang version here https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/languages/CNNTrainLang/blob/master/src/main/resources/templates/Config.ftl
assigned to @carlos.alfredo.yeverino
after using cnn-arch and cnn-train with version 0.2.3-SNAPSHOT, the pool_type parameter of the Pooling layer in generated networks has no quotes anymore. Therefore, the current tests of CNNArch2MXNet fail. Is that correct? Should I just adapt the tests?
According to the documentation provided in https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/languages/CNNArchLang , the mentioned parameter can have the following values: pool_type ({"avg", "max"}, required): Pooling type to be applied.
Hi @carlos.alfredo.yeverino I actually have quotes in the generated code in CNNArchLang. Could you please push your current code to the branch so that I can also test it?
added 4 commits
-
ce8f15af...29d9750a - 2 commits from branch
master
- 4d88a180 - Merge branch 'master' into added-trainer
- 4c2429ec - Updated pom: cnn-arch and cnn-train versions changed to 0.2.3-SNAPSHOT
-
ce8f15af...29d9750a - 2 commits from branch
I just pushed it. Please switch to branch "added-trainer" for testing.
@carlos.alfredo.yeverino thanks. The error comes from CNNArchLang, I will now fix it.
added 1 commit
- 6da2ce91 - Fixed issue with quotes in pooling type value
@carlos.alfredo.yeverino I fixed the quotes issue in this project by adding quotes directly to the template. It seems that string processing has changed so that I could not do it in CNNArchLang. The only faling test now is testCNNTrainerGeneration()
@carlos.alfredo.yeverino I am planning to delete all generation-related code from CNNTrainLang. Maybe you could move these tests https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/languages/CNNTrainLang/blob/master/src/test/java/de/monticore/lang/monticar/cnntrain/GenerationTest.java to this project?
did you also make changes in cnn-train that could affect the following code?
CNNTrainCompilationUnitSymbol compilationUnit = scope.<CNNTrainCompilationUnitSymbol> resolve("Network1", CNNTrainCompilationUnitSymbol.KIND).get();
Error of testCNNTrainerGeneration() occurs while executing that code line.
Regarding the tests, I think there should be no problem to move them into CNNArch2MXNet.
Hi @carlos.alfredo.yeverino I have fixed this error and will now release CNNTrainLang version 0.2.4-SNAPSHOT.