Commit 844877c0 authored by Christian Fuß's avatar Christian Fuß

Made 'size' parameter for OneHot Layer optional.

parent ba58750a
Pipeline #153413 failed with stages
in 2 minutes and 29 seconds
......@@ -162,8 +162,13 @@ public class ArchitectureElementData {
}
public int getSize(){
return ((LayerSymbol) getElement())
.getIntValue(AllPredefinedLayers.ONE_HOT_SIZE_NAME).get();
if(getElement().isOutput()) {
return ((LayerSymbol) getElement())
.getIntValue(AllPredefinedLayers.ONE_HOT_SIZE_NAME).get();
}else{
return ((LayerSymbol) getElement())
.getIntValue(AllPredefinedLayers.ONE_HOT_SIZE_NAME).get();
}
}
@Nullable
......
${element.name} = mx.symbol.one_hot(data=${element.inputs[0]},
indices=mx.symbol.argmax(data=${element.inputs[0]}, axis=1), depth=${element.size}))
<#include "OutputShape.ftl">
\ No newline at end of file
<#assign size = element.size>
${element.name} = mx.symbol.one_hot(data=${element.inputs[0]},
indices=mx.symbol.argmax(data=${element.inputs[0]}, axis=1), depth=${size})
<#include "OutputShape.ftl">
\ 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