Commit fa3c7beb authored by cesomark's avatar cesomark

Added invalid type test

parent 41bd1e53
Pipeline #156042 failed with stages
in 10 seconds
......@@ -208,4 +208,18 @@ public class GenerationTest extends AbstractSymtabTest {
assertTrue(Log.getErrorCount() == 0);
}
@Test
public void testInvalidTypeCocos() {
Log.getFindings().clear();
String[] args = { "-m", "src/test/resources/models/", "-r", "tagging.AlexnetInvalidType", "-b", "MXNET", "-f",
"n", "-c", "n" };
EMADLGeneratorCli.main(args);
assertEquals(Log.getFindings().size(), 2);
assertEquals(Log.getFindings().get(0).toString(), "DatapathType is incorrect, must be of Type: HDF5 or LMDB");
assertEquals(Log.getFindings().get(1).toString(),
"Tagfile was found, ignoring data_paths.txt: src/test/resources/models");
assertTrue(Log.getErrorCount() == 0);
}
}
......@@ -4,6 +4,7 @@ conforms to dltag.DataPathTagSchema;
tags Alexnet {
tag Alexnet with DataPath = {path = src/test/resources/models, type = LMDB};
tag AlexnetInvalid with DataPath = {path = test/resources/models, type = random};
tag AlexnetInvalidType with DataPath = {path = src/test/resources/models, type = LMBD};
tag Parent.a1 with DataPath = {path = instanceA1, type = random};
}
......
configuration AlexnetInvalidType{
num_epoch : 100
batch_size : 500
optimizer : adam{
learning_rate : 0.001
}
}
package tagging;
component AlexnetInvalidType{
ports in Z(0:255)^{3, 224, 224} image,
out Q(0:1)^{1000} predictions;
implementation CNN {
def split1(i){
[i] ->
Convolution(kernel=(5,5), channels=128) ->
Lrn(nsize=5, alpha=0.0001, beta=0.75) ->
Pooling(pool_type="max", kernel=(3,3), stride=(2,2), padding="no_loss") ->
Relu()
}
def split2(i){
[i] ->
Convolution(kernel=(3,3), channels=192) ->
Relu() ->
Convolution(kernel=(3,3), channels=128) ->
Pooling(pool_type="max", kernel=(3,3), stride=(2,2), padding="no_loss") ->
Relu()
}
def fc(){
FullyConnected(units=4096) ->
Relu() ->
Dropout()
}
image ->
Convolution(kernel=(11,11), channels=96, stride=(4,4), padding="no_loss") ->
Lrn(nsize=5, alpha=0.0001, beta=0.75) ->
Pooling(pool_type="max", kernel=(3,3), stride=(2,2), padding="no_loss") ->
Relu() ->
Split(n=2) ->
split1(i=[0|1]) ->
Concatenate() ->
Convolution(kernel=(3,3), channels=384) ->
Relu() ->
Split(n=2) ->
split2(i=[0|1]) ->
Concatenate() ->
fc(->=2) ->
FullyConnected(units=1000) ->
Softmax() ->
predictions
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment