在Linux主机上使用dex2oat编译APK

时间:2018-06-25 12:34:38

标签: android apk dex dex2oat

我正在尝试在Linux主机上使用dex2oat将APK(更具体地说是dex文件)编译为OAT。我按照给出的here的说明进行操作,并出现以下错误:

@params_as_tensors def precompute(self): p_num_inducing = len(self.feature) p_err = self.Y - self.mean_function(self.X) p_Kuf = self.feature.Kuf(self.kern, self.X) p_Kuu = self.feature.Kuu(self.kern, jitter=settings.numerics.jitter_level) p_sigma = tf.sqrt(self.likelihood.variance) self.p_L = tf.cholesky(p_Kuu) p_A = tf.matrix_triangular_solve(self.p_L, p_Kuf, lower=True) / p_sigma p_B = tf.matmul(p_A, p_A, transpose_b=True) + tf.eye(p_num_inducing, dtype=settings.tf_float) self.p_LB = tf.cholesky(p_B) p_Aerr = tf.matmul(p_A, p_err) self.p_c = tf.matrix_triangular_solve(self.p_LB, p_Aerr, lower=True) / p_sigma @params_as_tensors def _build_predict(self, Xnew, full_cov=False): """ Compute the mean and variance of the latent function at some new points Xnew. For a derivation of the terms in here, see the associated SGPR notebook. """ Kus = self.feature.Kuf(self.kern, Xnew) tmp1 = tf.matrix_triangular_solve(self.p_L, Kus, lower=True) tmp2 = tf.matrix_triangular_solve(self.p_LB, tmp1, lower=True) mean = tf.matmul(tmp2, self.p_c, transpose_a=True) if full_cov: var = self.kern.K(Xnew) + tf.matmul(tmp2, tmp2, transpose_a=True) \ - tf.matmul(tmp1, tmp1, transpose_a=True) shape = tf.stack([1, 1, tf.shape(self.Y)[1]]) var = tf.tile(tf.expand_dims(var, 2), shape) else: var = self.kern.Kdiag(Xnew) + tf.reduce_sum(tf.square(tmp2), 0) \ - tf.reduce_sum(tf.square(tmp1), 0) shape = tf.stack([1, tf.shape(self.Y)[1]]) var = tf.tile(tf.expand_dims(var, 1), shape) return mean + self.mean_function(Xnew), var

它会响起钟声吗,还是有另一种无需使用仿真器或VM即可编译为OAT的方法?

0 个答案:

没有答案