Aufgrund einer Wartung wird GitLab am 21.09. zwischen 8:00 und 9:00 Uhr kurzzeitig nicht zur Verfügung stehen. / Due to maintenance, GitLab will be temporarily unavailable on 21.09. between 8:00 and 9:00 am.

Commit 973701a6 authored by Evgeny Kusmenko's avatar Evgeny Kusmenko
Browse files

Merge branch 'develop' into 'master'

Added some information about the ArgMax layer in Readme.md

See merge request !30
parents 8af1f42e e7a5ce6b
......@@ -421,6 +421,7 @@ All predefined methods start with a capital letter and all constructed methods h
* **ArgMax()**
Computes the index of the maximal value of its input vector. Useful for recurrent networks, when the output of a timestep should be used as integer input for the next timestep.
Notice that the Argmax Layer is applied after calculating the loss in the respective backend. This means that loss can still be computed correctly (e.g. from a Softmax layer before the ArgMax), but recurrent networks get only the element with the highest probability as input for their next timestep.
* **BeamSearch(max_length, width)**
......
......@@ -33,7 +33,7 @@
<mc.grammars.assembly.version>0.0.6</mc.grammars.assembly.version>
<SIUnit.version>0.0.11</SIUnit.version>
<Common-MontiCar.version>0.0.14-20180704.113055-2</Common-MontiCar.version>
<Math.version>0.0.19-20180727.084044-1</Math.version>
<Math.version>0.0.20-SNAPSHOT</Math.version>
<!-- .. Libraries .................................................. -->
<guava.version>18.0</guava.version>
......
......@@ -50,6 +50,26 @@ public class ArchTypeSymbol extends CommonSymbol {
return heightIndex;
}
public HashMap<String, String> getElementRange() {
String min="", max="";
Optional<ASTRange> range = domain.getRangeOpt();
if (range.isPresent() && (domain.isRational() || domain.isWholeNumber() || domain.isNaturalNumber() || domain.isComplex())) {
if(range.get().hasNoLowerLimit()) { min="-inf"; } else {
min = Double.toString(range.get().getStartValue().doubleValue());
}
if (range.get().hasNoUpperLimit()) { max="inf"; } else {
max = Double.toString(range.get().getEndValue().doubleValue());
}
} else { // domain.isBoolean()
min = "0";
max = "1";
}
HashMap result = new HashMap<String, String>();
result.put("min", min);
result.put("max", max);
return result;
}
public void setHeightIndex(int heightIndex) {
this.heightIndex = heightIndex;
}
......
......@@ -86,6 +86,7 @@ public class AllPredefinedLayers {
public static final String BEAMSEARCH_MAX_LENGTH = "max_length";
public static final String BEAMSEARCH_WIDTH_NAME = "width";
public static final String SHAPE_NAME = "shape";
public static final String RNN_DROPOUT_NAME = "dropout";
//possible String values
public static final String PADDING_VALID = "valid";
......
......@@ -101,6 +101,11 @@ abstract public class BaseRNN extends PredefinedLayerDeclaration {
.constraints(Constraints.INTEGER, Constraints.POSITIVE)
.defaultValue(1)
.build(),
new ParameterSymbol.Builder()
.name(AllPredefinedLayers.RNN_DROPOUT_NAME)
.constraints(Constraints.NUMBER, Constraints.BETWEEN_ZERO_AND_ONE)
.defaultValue(0)
.build(),
new ParameterSymbol.Builder()
.name(AllPredefinedLayers.BIDIRECTIONAL_NAME)
.constraints(Constraints.BOOLEAN)
......
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