fix: IOException no longer thrown by read(). (#120)

Signed-off-by: Robert Altena <Rob@Ra-ai.com>
master
Robert Altena 2019-08-16 10:19:55 +09:00 committed by Alex Black
parent 987bb80c46
commit 0a3e78b540
1 changed files with 1 additions and 5 deletions

View File

@ -70,11 +70,7 @@ public class Nd4jSerializer extends Serializer<INDArray> {
@Override
public INDArray read(Kryo kryo, Input input, Class<INDArray> type) {
DataInputStream dis = new DataInputStream(input);
try {
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)
}