fix: IOException no longer thrown by read(). (#120)
Signed-off-by: Robert Altena <Rob@Ra-ai.com>master
parent
987bb80c46
commit
0a3e78b540
|
@ -70,11 +70,7 @@ public class Nd4jSerializer extends Serializer<INDArray> {
|
||||||
@Override
|
@Override
|
||||||
public INDArray read(Kryo kryo, Input input, Class<INDArray> type) {
|
public INDArray read(Kryo kryo, Input input, Class<INDArray> type) {
|
||||||
DataInputStream dis = new DataInputStream(input);
|
DataInputStream dis = new DataInputStream(input);
|
||||||
try {
|
return Nd4j.read(dis);
|
||||||
return Nd4j.read(dis);
|
|
||||||
} catch (IOException e) {
|
|
||||||
throw new RuntimeException(e);
|
|
||||||
}
|
|
||||||
//Note: input should NOT be closed manually here - may be needed elsewhere (and closing here will cause serialization to fail)
|
//Note: input should NOT be closed manually here - may be needed elsewhere (and closing here will cause serialization to fail)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue