List of usage examples for com.google.gson JsonObject getAsJsonPrimitive
public JsonPrimitive getAsJsonPrimitive(String memberName)
From source file:com.simiacryptus.mindseye.layers.cudnn.GateBiasLayer.java
License:Apache License
/** * Instantiates a new Product inputs key. * * @param id the id/*from w w w. j ava 2s .c o m*/ */ protected GateBiasLayer(@Nonnull final JsonObject id) { super(id); this.precision = Precision.valueOf(id.getAsJsonPrimitive("precision").getAsString()); }
From source file:com.simiacryptus.mindseye.layers.cudnn.GramianLayer.java
License:Apache License
/** * Instantiates a new Img eval key./*from w ww .ja v a2 s . com*/ * * @param json the json * @param rs the rs */ protected GramianLayer(@Nonnull final JsonObject json, Map<CharSequence, byte[]> rs) { super(json); this.precision = Precision.valueOf(json.getAsJsonPrimitive("precision").getAsString()); this.alpha = json.getAsJsonPrimitive("alpha").getAsDouble(); }
From source file:com.simiacryptus.mindseye.layers.cudnn.ImgBandBiasLayer.java
License:Apache License
/** * Instantiates a new Product inputs key. * * @param id the id// w ww . ja v a2 s.c om * @param rs the rs */ protected ImgBandBiasLayer(@Nonnull final JsonObject id, final Map<CharSequence, byte[]> rs) { super(id); this.precision = Precision.valueOf(id.getAsJsonPrimitive("precision").getAsString()); this.bias = Tensor.fromJson(id.get("bias"), rs); }
From source file:com.simiacryptus.mindseye.layers.cudnn.ImgCropLayer.java
License:Apache License
/** * Instantiates a new Img eval key./* w w w. ja v a 2 s .c o m*/ * * @param json the json * @param rs the rs */ protected ImgCropLayer(@Nonnull final JsonObject json, Map<CharSequence, byte[]> rs) { super(json); sizeX = json.get("sizeX").getAsInt(); sizeY = json.get("sizeY").getAsInt(); this.precision = Precision.valueOf(json.getAsJsonPrimitive("precision").getAsString()); assert 0 < sizeX; assert 0 < sizeY; }
From source file:com.simiacryptus.mindseye.layers.cudnn.ImgLinearSubnetLayer.java
License:Apache License
/** * Instantiates a new Rescaled subnet key. * * @param json the json//from ww w. j a v a 2 s. c o m * @param rs the rs */ protected ImgLinearSubnetLayer(@Nonnull final JsonObject json, Map<CharSequence, byte[]> rs) { super(json); this.precision = Precision.valueOf(json.getAsJsonPrimitive("precision").getAsString()); setParallel(json.get("parallel").getAsBoolean()); JsonArray jsonArray = json.get("legs").getAsJsonArray(); for (int i = 0; i < jsonArray.size(); i++) { legs.add(new SubnetLeg(jsonArray.get(i).getAsJsonObject(), rs)); } }
From source file:com.simiacryptus.mindseye.layers.cudnn.ImgMinSizeLayer.java
License:Apache License
/** * Instantiates a new Img eval key.//from w w w.j a v a2 s .co m * * @param json the json * @param rs the rs */ protected ImgMinSizeLayer(@Nonnull final JsonObject json, Map<CharSequence, byte[]> rs) { super(json); sizeX = json.get("sizeX").getAsInt(); sizeY = json.get("sizeY").getAsInt(); this.precision = Precision.valueOf(json.getAsJsonPrimitive("precision").getAsString()); }
From source file:com.simiacryptus.mindseye.layers.cudnn.ImgModulusPaddingLayer.java
License:Apache License
/** * Instantiates a new Img eval key.// ww w .ja v a2s.c o m * * @param json the json * @param rs the rs */ protected ImgModulusPaddingLayer(@Nonnull final JsonObject json, Map<CharSequence, byte[]> rs) { super(json); sizeX = json.get("sizeX").getAsInt(); sizeY = json.get("sizeY").getAsInt(); offsetX = json.get("offsetX").getAsInt(); offsetY = json.get("offsetY").getAsInt(); this.precision = Precision.valueOf(json.getAsJsonPrimitive("precision").getAsString()); }
From source file:com.simiacryptus.mindseye.layers.cudnn.ImgTileAssemblyLayer.java
License:Apache License
/** * Instantiates a new Img eval key.// w w w. j av a 2 s. co m * * @param json the json * @param rs the rs */ protected ImgTileAssemblyLayer(@Nonnull final JsonObject json, Map<CharSequence, byte[]> rs) { super(json); columns = json.get("columns").getAsInt(); rows = json.get("rows").getAsInt(); this.parallel = json.get("parallel").getAsBoolean(); this.precision = Precision.valueOf(json.getAsJsonPrimitive("precision").getAsString()); }
From source file:com.simiacryptus.mindseye.layers.cudnn.ImgTileCycleLayer.java
License:Apache License
/** * Instantiates a new Img eval key.//from ww w .j ava 2 s . co m * * @param json the json * @param rs the rs */ protected ImgTileCycleLayer(@Nonnull final JsonObject json, Map<CharSequence, byte[]> rs) { super(json); this.precision = Precision.valueOf(json.getAsJsonPrimitive("precision").getAsString()); }
From source file:com.simiacryptus.mindseye.layers.cudnn.ImgTileSelectLayer.java
License:Apache License
/** * Instantiates a new Img eval key.//from w w w .ja va2 s .co m * * @param json the json * @param rs the rs */ protected ImgTileSelectLayer(@Nonnull final JsonObject json, Map<CharSequence, byte[]> rs) { super(json); sizeY = json.get("sizeX").getAsInt(); sizeX = json.get("sizeY").getAsInt(); positionX = json.get("positionX").getAsInt(); positionY = json.get("positionY").getAsInt(); this.precision = Precision.valueOf(json.getAsJsonPrimitive("precision").getAsString()); }