本文整理了Java中org.datavec.api.writable.Writable.toInt()
方法的一些代码示例,展示了Writable.toInt()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Writable.toInt()
方法的具体详情如下:
包路径:org.datavec.api.writable.Writable
类名称:Writable
方法名:toInt
暂无
代码示例来源:origin: org.datavec/datavec-spark
@Override
public int compare(List<Writable> o1, List<Writable> o2) {
return Integer.compare(o1.get(1).toInt(), o2.get(1).toInt());
}
});
代码示例来源:origin: org.datavec/datavec-spark
@Override
public int compare(List<Writable> o1, List<Writable> o2) {
return Integer.compare(o1.get(1).toInt(), o2.get(1).toInt());
}
});
代码示例来源:origin: org.datavec/datavec-spark_2.11
@Override
public int compare(List<Writable> o1, List<Writable> o2) {
return Integer.compare(o1.get(1).toInt(), o2.get(1).toInt());
}
});
代码示例来源:origin: org.datavec/datavec-spark_2.11
@Override
public int compare(List<Writable> o1, List<Writable> o2) {
return Integer.compare(o1.get(1).toInt(), o2.get(1).toInt());
}
});
代码示例来源:origin: org.datavec/datavec-spark
break;
case Integer:
values[i + 2] = step.get(i).toInt();
break;
case Long:
代码示例来源:origin: org.datavec/datavec-spark_2.11
break;
case Integer:
values[i + 2] = step.get(i).toInt();
break;
case Long:
代码示例来源:origin: org.datavec/datavec-hadoop
switch (convertTextTo) {
case Byte:
newWritable = new ByteWritable((byte) writable.toInt());
break;
case Double:
break;
case Int:
newWritable = new IntWritable(writable.toInt());
break;
case Long:
代码示例来源:origin: org.datavec/datavec-spark_2.11
break;
case Integer:
values[i] = v1.get(i).toInt();
break;
case Long:
代码示例来源:origin: org.datavec/datavec-spark
break;
case Integer:
values[i] = v1.get(i).toInt();
break;
case Long:
代码示例来源:origin: org.datavec/datavec-spark_2.11
@Override
public IntegerAnalysisCounter add(Writable writable) {
int value = writable.toInt();
if (value == 0)
countZero++;
if (value == getMinValueSeen())
countMinValue++;
else if (value < getMinValueSeen()) {
countMinValue = 1;
}
if (value == getMaxValueSeen())
countMaxValue++;
else if (value > getMaxValueSeen()) {
countMaxValue = 1;
}
if (value >= 0) {
countPositive++;
} else {
countNegative++;
} ;
counter.merge((double) value);
return this;
}
代码示例来源:origin: org.deeplearning4j/deeplearning4j-datavec-iterators
int classIdx = w.toInt();
if (classIdx >= details.oneHotNumClasses) {
throw new IllegalStateException("Cannot convert sequence writables to one-hot: class index " + classIdx
"indexed, thus only values 0 to nClasses-1 are valid)");
arr.putScalar(i, w.toInt(), 1.0);
} else {
代码示例来源:origin: org.deeplearning4j/deeplearning4j-core
int classIdx = w.toInt();
if (classIdx >= details.oneHotNumClasses) {
throw new DL4JException("Cannot convert sequence writables to one-hot: class index " + classIdx
+ " >= numClass (" + details.oneHotNumClasses + ")");
arr.putScalar(i, w.toInt(), 1.0);
} else {
代码示例来源:origin: org.datavec/datavec-spark
@Override
public IntegerAnalysisCounter add(Writable writable) {
int value = writable.toInt();
if (value == 0)
countZero++;
if (value == getMinValueSeen())
countMinValue++;
else if (value < getMinValueSeen()) {
countMinValue = 1;
}
if (value == getMaxValueSeen())
countMaxValue++;
else if (value > getMaxValueSeen()) {
countMaxValue = 1;
}
if (value >= 0) {
countPositive++;
} else {
countNegative++;
} ;
counter.merge((double) value);
return this;
}
代码示例来源:origin: org.deeplearning4j/deeplearning4j-datavec-iterators
w = iter.next();
int classIdx = w.toInt();
if (classIdx >= details.oneHotNumClasses) {
throw new IllegalStateException("Cannot convert sequence writables to one-hot: class index " + classIdx
代码示例来源:origin: org.deeplearning4j/deeplearning4j-core
w = iter.next();
int classIdx = w.toInt();
if (classIdx >= details.oneHotNumClasses) {
throw new DL4JException("Cannot convert sequence writables to one-hot: class index " + classIdx
内容来源于网络,如有侵权,请联系作者删除!