本文整理汇总了Java中org.apache.commons.math3.linear.MatrixUtils.deserializeRealMatrix方法的典型用法代码示例。如果您正苦于以下问题:Java MatrixUtils.deserializeRealMatrix方法的具体用法?Java MatrixUtils.deserializeRealMatrix怎么用?Java MatrixUtils.deserializeRealMatrix使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.commons.math3.linear.MatrixUtils
的用法示例。
在下文中一共展示了MatrixUtils.deserializeRealMatrix方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: readSetup
import org.apache.commons.math3.linear.MatrixUtils; //导入方法依赖的package包/类
public static MLPSetup readSetup(String filename) throws IOException, ClassNotFoundException {
System.out.println("Loading weights " + MLPSetup.class.getResource(filename).getFile());
MLPSetup setup = new MLPSetup();
InputStream fis = MLPSetup.class.getResourceAsStream(filename);
ObjectInputStream ois = new ObjectInputStream(fis);
MatrixUtils.deserializeRealMatrix(setup, "W1", ois);
MatrixUtils.deserializeRealMatrix(setup, "W2", ois);
MatrixUtils.deserializeRealVector(setup.norm, "inputMin", ois);
MatrixUtils.deserializeRealVector(setup.norm, "inputMax", ois);
MatrixUtils.deserializeRealVector(setup.norm, "targetMin", ois);
MatrixUtils.deserializeRealVector(setup.norm, "targetMax", ois);
ois.close();
return setup;
}
示例2: readObject
import org.apache.commons.math3.linear.MatrixUtils; //导入方法依赖的package包/类
/**
* Deserialize the instance.
* @param ois stream from which the object should be read
* @throws ClassNotFoundException if a class in the stream cannot be found
* @throws IOException if object cannot be read from the stream
*/
private void readObject(ObjectInputStream ois)
throws ClassNotFoundException, IOException {
ois.defaultReadObject();
MatrixUtils.deserializeRealMatrix(this, "tableau", ois);
}