org.deeplearning4j.nn.api.Layer.getInputMiniBatchSize()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(1.6k)|赞(0)|评价(0)|浏览(112)

本文整理了Java中org.deeplearning4j.nn.api.Layer.getInputMiniBatchSize()方法的一些代码示例,展示了Layer.getInputMiniBatchSize()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Layer.getInputMiniBatchSize()方法的具体详情如下:
包路径:org.deeplearning4j.nn.api.Layer
类名称:Layer
方法名:getInputMiniBatchSize

Layer.getInputMiniBatchSize介绍

[英]Get current/last input mini-batch size, as set by setInputMiniBatchSize(int)
[中]获取setInputMiniBatchSize(int)设置的当前/上次输入小批量大小

代码示例

代码示例来源:origin: org.deeplearning4j/deeplearning4j-nn

@Override
public int getInputMiniBatchSize() {
  return insideLayer.getInputMiniBatchSize();
}

代码示例来源:origin: org.deeplearning4j/deeplearning4j-ui-model

private void updateExamplesMinibatchesCounts(Model model) {
  ModelInfo modelInfo = getModelInfo(model);
  int examplesThisMinibatch = 0;
  if (model instanceof MultiLayerNetwork) {
    examplesThisMinibatch = ((MultiLayerNetwork) model).batchSize();
  } else if (model instanceof ComputationGraph) {
    examplesThisMinibatch = ((ComputationGraph) model).batchSize();
  } else if (model instanceof Layer) {
    examplesThisMinibatch = ((Layer) model).getInputMiniBatchSize();
  }
  modelInfo.examplesSinceLastReport += examplesThisMinibatch;
  modelInfo.totalExamples += examplesThisMinibatch;
  modelInfo.minibatchesSinceLastReport++;
  modelInfo.totalMinibatches++;
}

代码示例来源:origin: neo4j-contrib/neo4j-ml-procedures

Node node = node("Layer",
    "type", layer.type().name(), "index", layer.getIndex(),
    "pretrainLayer", layer.isPretrainLayer(), "miniBatchSize", layer.getInputMiniBatchSize(),
    "numParams", layer.numParams());
if (layer instanceof DenseLayer) {

相关文章