Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
E
EMADL2CPP
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
1
Merge Requests
1
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Test Cases
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
monticore
EmbeddedMontiArc
generators
EMADL2CPP
Commits
01835309
Commit
01835309
authored
Apr 10, 2019
by
Nicola Gatto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make data_paths.txt optional
parent
4c82b947
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
8 deletions
+16
-8
src/main/java/de/monticore/lang/monticar/emadl/generator/EMADLGenerator.java
...nticore/lang/monticar/emadl/generator/EMADLGenerator.java
+16
-8
No files found.
src/main/java/de/monticore/lang/monticar/emadl/generator/EMADLGenerator.java
View file @
01835309
...
...
@@ -228,12 +228,14 @@ public class EMADLGenerator {
String
b
=
backend
.
getBackendString
(
backend
);
String
trainingDataHash
=
""
;
String
testDataHash
=
""
;
if
(
b
.
equals
(
"CAFFE2"
)){
trainingDataHash
=
getChecksumForFile
(
architecture
.
get
().
getDataPath
()
+
"/train_lmdb/data.mdb"
);
testDataHash
=
getChecksumForFile
(
architecture
.
get
().
getDataPath
()
+
"/test_lmdb/data.mdb"
);
}
else
{
trainingDataHash
=
getChecksumForFile
(
architecture
.
get
().
getDataPath
()
+
"/train.h5"
);
testDataHash
=
getChecksumForFile
(
architecture
.
get
().
getDataPath
()
+
"/test.h5"
);
if
(
architecture
.
get
().
getDataPath
()
!=
null
)
{
if
(
b
.
equals
(
"CAFFE2"
))
{
trainingDataHash
=
getChecksumForFile
(
architecture
.
get
().
getDataPath
()
+
"/train_lmdb/data.mdb"
);
testDataHash
=
getChecksumForFile
(
architecture
.
get
().
getDataPath
()
+
"/test_lmdb/data.mdb"
);
}
else
{
trainingDataHash
=
getChecksumForFile
(
architecture
.
get
().
getDataPath
()
+
"/train.h5"
);
testDataHash
=
getChecksumForFile
(
architecture
.
get
().
getDataPath
()
+
"/test.h5"
);
}
}
String
trainingHash
=
emadlHash
+
"#"
+
cnntHash
+
"#"
+
trainingDataHash
+
"#"
+
testDataHash
;
...
...
@@ -360,8 +362,14 @@ public class EMADLGenerator {
EMADLCocos
.
checkAll
(
componentInstanceSymbol
);
if
(
architecture
.
isPresent
()){
DataPathConfigParser
newParserConfig
=
new
DataPathConfigParser
(
getModelsPath
()
+
"data_paths.txt"
);
String
dPath
=
newParserConfig
.
getDataPath
(
EMAComponentSymbol
.
getFullName
());
String
dPath
=
null
;
Path
dataPathDefinition
=
Paths
.
get
(
getModelsPath
(),
"data_paths.txt"
);
if
(
dataPathDefinition
.
toFile
().
exists
())
{
DataPathConfigParser
newParserConfig
=
new
DataPathConfigParser
(
getModelsPath
()
+
"data_paths.txt"
);
dPath
=
newParserConfig
.
getDataPath
(
EMAComponentSymbol
.
getFullName
());
}
else
{
Log
.
warn
(
"No data path definition found in "
+
dataPathDefinition
+
" found: No generation of data loader"
);
}
/*String dPath = DataPathConfigParser.getDataPath(getModelsPath() + "data_paths.txt", componentSymbol.getFullName());*/
architecture
.
get
().
setDataPath
(
dPath
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment