use of org.nd4j.shade.serde.jackson.ndarray.NDArrayDeSerializer in project deeplearning4j by deeplearning4j.
the class ObjectMapperProvider method module.
public static SimpleModule module() {
SimpleModule module = new SimpleModule("nd4j");
module.addDeserializer(INDArray.class, new NDArrayDeSerializer());
module.addSerializer(INDArray.class, new NDArraySerializer());
return module;
}
use of org.nd4j.shade.serde.jackson.ndarray.NDArrayDeSerializer in project deeplearning4j by deeplearning4j.
the class TestSerialization method getMapper.
public ObjectMapper getMapper() {
ObjectMapper mapper = new ObjectMapper();
SimpleModule nd4j = new SimpleModule("nd4j");
nd4j.addDeserializer(INDArray.class, new NDArrayDeSerializer());
nd4j.addSerializer(INDArray.class, new NDArraySerializer());
mapper.registerModule(nd4j);
return mapper;
}
Aggregations