本文整理匯總了Java中org.apache.commons.math3.linear.MatrixUtils.deserializeRealVector方法的典型用法代碼示例。如果您正苦於以下問題:Java MatrixUtils.deserializeRealVector方法的具體用法?Java MatrixUtils.deserializeRealVector怎麽用?Java MatrixUtils.deserializeRealVector使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.apache.commons.math3.linear.MatrixUtils
的用法示例。
在下文中一共展示了MatrixUtils.deserializeRealVector方法的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.deserializeRealVector(this, "coefficients", ois);
}