Commit 95e4b087 authored by Christian Fuß's avatar Christian Fuß
Browse files

progress

parent 7765d26b
......@@ -73,7 +73,7 @@ grammar CNNArch extends de.monticore.CommonExpressions, de.monticore.lang.Math,
Unroll implements ArchitectureElement = "unroll" "<" timeParameter:LayerParameter ">"
Name "(" arguments:(ArchArgument || ",")* ")"
"{" body:Stream "}";
"{" input:IOElement? body:Stream output:IOElement? "}";
ParallelBlock implements ArchitectureElement = "("
groups:Stream "|"
......
......@@ -152,6 +152,7 @@ public class LayerSymbol extends ArchitectureElementSymbol {
}
else {
//split the layer if it contains an argument sequence
System.err.println("Resolve() called in " + this.getName());
ArchitectureElementSymbol splitComposite = resolveSequences(parallelLength, getSerialLengths().get());
setResolvedThis(splitComposite);
splitComposite.resolveOrError();
......
......@@ -44,8 +44,11 @@ public class BeamSearchStart extends PredefinedUnrollDeclaration {
System.err.println("LastElement: " + elements.get(elements.size()-1));
//System.err.println("LastElement_Channels: " + elements.get(elements.size()-1).getOutputTypes().get(0).getChannels());
for(ArchitectureElementSymbol item:elements){
System.err.println("name2" + item.getOutputElement().get().toString());
System.err.println("channels: " + item.getOutputTypes().get(0).getChannels().toString());
System.err.println("Resolved?1: " + item.isResolved());
item.resolve();
System.err.println("Resolved?2: " + item.isResolved());
//System.err.println("name2" + item.getOutputElement().get().toString());
//System.err.println("channels: " + item.getOutputTypes().get(0).getChannels().toString());
System.err.println("name3" + item.getName());
}
}catch(Exception e){
......@@ -62,7 +65,7 @@ public class BeamSearchStart extends PredefinedUnrollDeclaration {
@Override
public void checkInput(List<ArchTypeSymbol> inputTypes, UnrollSymbol layer) {
errorIfInputSizeIsNotOne(inputTypes, layer);
//errorIfInputSizeIsNotOne(inputTypes, layer);
}
public static BeamSearchStart create(){
......
......@@ -67,6 +67,7 @@ public class AllCoCoTest extends AbstractCoCoTest {
checkValid("valid_tests", "MultipleOutputs");
checkValid("valid_tests", "MultipleStreams");
checkValid("valid_tests", "Alexnet_alt_OneHotOutput");
checkValid("valid_tests", "RNNencdec");
}
@Test
......
......@@ -30,11 +30,6 @@ architecture Alexnet(img_height=224, img_width=224, img_channels=3, classes=10){
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") ->
unroll<t> BeamSearchStart (width=5, max_length = 50){
FullyConnected(units=4096) ->
Relu() ->
Dropout()
} ->
Relu() ->
Split(n=2) ->
split1(i=[0|1]) ->
......
architecture RNNencdec(max_length=50, vocabulary_size=30000, hidden_size=1000){
def input Q(0:1)^{vocabulary_size} source
def output Q(0:1)^{vocabulary_size} target
source ->
FullyConnected(units=vocabulary_size) ->
Softmax() ->
target;
unroll<t> BeamSearchStart(max_length=max_length) {
source ->
FullyConnected(units=vocabulary_size) ->
Softmax()
} ->
target;
}
\ 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