Commit a26fb1e4 authored by Christian Fuß's avatar Christian Fuß
Browse files

added tests

parent b6071547
Pipeline #213629 passed with stages
in 7 minutes and 5 seconds
......@@ -33,6 +33,7 @@ public class AllCoCoTest extends AbstractCoCoTest {
checkValid("models", "ResNet152");
checkValid("models", "ResNeXt50");
checkValid("models", "RNNsearch");
checkValid("models", "Show_attend_tell");
checkValid("models", "simulator.MainController");
......
configuration Show_attend_tell{
num_epoch:2
batch_size:2
context:cpu
eval_metric:bleu
loss:softmax_cross_entropy
use_teacher_forcing:true
save_attention_image:true
optimizer:adam{
learning_rate:0.005
learning_rate_decay:0.9
step_size:1000
weight_decay:0.0001
}
}
component Show_attend_tell{
ports in Z(-oo:oo)^{64,2048} data,
in Z(0:255)^{3,224,224} images,
out Z(0:37758)^{1} target[25];
implementation CNN{
layer LSTM(units=512) decoder;
layer FullyConnected(units = 256, flatten=false) features;
layer FullyConnected(units = 1, flatten=false) attention;
0 -> target[0];
data -> features;
timed <t> GreedySearch(max_length=25){
(
(
(
features.output ->
FullyConnected(units=512, flatten=false)
|
decoder.state[0] ->
FullyConnected(units=512, flatten=false)
) ->
BroadcastAdd() ->
Tanh() ->
FullyConnected(units=1, flatten=false) ->
Softmax(axis=0) ->
attention
|
features.output
)->
BroadcastMultiply() ->
ReduceSum(axis=0) ->
ExpandDims(axis=0)
|
target[t-1] ->
Embedding(output_dim=256)
) ->
Concatenate(axis=1) ->
decoder ->
FullyConnected(units=37758) ->
Tanh() ->
Dropout(p=0.25) ->
Softmax() ->
ArgMax() ->
target[t]
};
}
}
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