Updated Readme.md

parent d588c14a
This diff is collapsed.
......@@ -106,7 +106,7 @@ abstract public class PredefinedMethodDeclaration extends MethodDeclarationSymbo
}
}
else if (borderModeSetting.equals(AllPredefinedMethods.PADDING_NO_LOSS)){
//padding until no data gets discarded
//padding until no data gets discarded, same as valid with a stride of 1
outputWidth = 1 + Math.max(0, ((inputWidth - kernelWidth + strideWidth - 1) / strideWidth));
outputHeight = 1 + Math.max(0, ((inputHeight - kernelHeight + strideHeight - 1) / strideHeight));
}
......
......@@ -66,7 +66,7 @@ public class SymtabTest extends AbstractSymtabTest {
public void testFixedThreeInput(){
Scope symTab = createSymTab("src/test/resources/valid_tests");
ArchitectureSymbol a = symTab.<ArchitectureSymbol>resolve(
"Fixed_ThreeInputCNN_M14",
"Alexnet_alt2",
ArchitectureSymbol.KIND).orElse(null);
assertNotNull(a);
a.resolve();
......
......@@ -54,6 +54,7 @@ public class AllCoCoTest extends AbstractCoCoTest {
checkValid("valid_tests", "SimpleNetworkRelu");
checkValid("valid_tests", "SimpleNetworkTanh");
checkValid("valid_tests", "ResNeXt50_alt");
checkValid("valid_tests", "Alexnet_alt2");
}
......
......@@ -2,14 +2,14 @@ architecture Alexnet{
def input Z(0:255)^{h=224,w=224,c=3} image
def output Q(0:1)^{classes=10} predictions
def group1(i){
def split1(i){
[i] ->
Convolution(kernel=(5,5), channels=128) ->
Lrn(nsize=5, alpha=0.0001, beta=0.75) ->
MaxPooling(kernel=(3,3), stride=(2,2), padding="no_loss") ->
Relu()
}
def group2(i){
def split2(i){
[i] ->
Convolution(kernel=(3,3), channels=192) ->
Relu() ->
......@@ -29,12 +29,12 @@ architecture Alexnet{
MaxPooling(kernel=(3,3), stride=(2,2), padding="no_loss") ->
Relu() ->
Split(n=2) ->
group1(i=[0|1]) ->
split1(i=[0|1]) ->
Concatenate() ->
Convolution(kernel=(3,3), channels=384) ->
Relu() ->
Split(n=2) ->
group2(i=[0|1]) ->
split2(i=[0|1]) ->
Concatenate() ->
fc(->=2) ->
FullyConnected(units=classes) ->
......
architecture Alexnet_alt2{
def input Z(0:255)^{h=224,w=224,c=3} image
def output Q(0:1)^{classes=10} predictions
def conv(filter, channels, convStride=1, poolStride=1, hasLrn=false, convPadding="same"){
Convolution(kernel=(filter,filter), channels=channels, stride=(convStride,convStride), padding=convPadding) ->
Lrn(nsize=5, alpha=0.0001, beta=0.75, If=hasLrn) ->
MaxPooling(kernel=(3,3), stride=(poolStride,poolStride), padding="no_loss", If=(poolStride != 1)) ->
Relu()
}
def split1(i){
[i] ->
conv(filter=5, channels=128, poolStride=2, hasLrn=true)
}
def split2(i){
[i] ->
conv(filter=3, channels=192) ->
conv(filter=3, channels=128, poolStride=2)
}
def fc(){
FullyConnected(units=4096) ->
Relu() ->
Dropout()
}
image ->
conv(filter=11, channels=96, convStride=4, poolStride=2, hasLrn=true, convPadding="no_loss") ->
Split(n=2) ->
split1(i=[0|1]) ->
Concatenate() ->
conv(filter=3, channels=384) ->
Split(n=2) ->
split2(i=[0|1]) ->
Concatenate() ->
fc(->=2) ->
FullyConnected(units=classes) ->
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