Java Code Examples for org.datavec.api.writable.WritableType#Double
The following examples show how to use
org.datavec.api.writable.WritableType#Double .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ConvertToDouble.java From DataVec with Apache License 2.0 | 5 votes |
@Override public DoubleWritable map(Writable writable) { if(writable.getType() == WritableType.Double){ return (DoubleWritable)writable; } return new DoubleWritable(writable.toDouble()); }
Example 2
Source File: ConvertToFloat.java From deeplearning4j with Apache License 2.0 | 5 votes |
@Override public FloatWritable map(Writable writable) { if(writable.getType() == WritableType.Double){ return (FloatWritable)writable; } return new FloatWritable(writable.toFloat()); }
Example 3
Source File: ConvertToDouble.java From deeplearning4j with Apache License 2.0 | 5 votes |
@Override public DoubleWritable map(Writable writable) { if(writable.getType() == WritableType.Double){ return (DoubleWritable)writable; } return new DoubleWritable(writable.toDouble()); }