提交 75f8bf3d 编写于 作者: S sangoly 提交者: GitHub

[Java API][Comment] upate java api & delete some comments (#1912)

上级 b120bccb
...@@ -14,7 +14,7 @@ limitations under the License. */ ...@@ -14,7 +14,7 @@ limitations under the License. */
package com.baidu.paddle.lite; package com.baidu.paddle.lite;
/** /**
* PowerMode is the cpu runing mode for the light weight predictor. * PowerMode is the cpu running power mode for the light weight predictor.
*/ */
public enum PowerMode { public enum PowerMode {
LITE_POWER_HIGH(0), LITE_POWER_HIGH(0),
...@@ -24,8 +24,6 @@ public enum PowerMode { ...@@ -24,8 +24,6 @@ public enum PowerMode {
LITE_POWER_RAND_HIGH(4), LITE_POWER_RAND_HIGH(4),
LITE_POWER_RAND_LOW(5); LITE_POWER_RAND_LOW(5);
public final int value;
private PowerMode(int value) { private PowerMode(int value) {
this.value = value; this.value = value;
} }
...@@ -33,4 +31,6 @@ public enum PowerMode { ...@@ -33,4 +31,6 @@ public enum PowerMode {
public int value() { public int value() {
return this.value; return this.value;
} }
private final int value;
} }
...@@ -126,8 +126,6 @@ void LoadLoDTensor(std::istream &is, Variable *var) { ...@@ -126,8 +126,6 @@ void LoadLoDTensor(std::istream &is, Variable *var) {
TensorFromStream(is, tensor); TensorFromStream(is, tensor);
} }
// TODO(Superjomn) support SelectedRows.
void ReadBinaryFile(const std::string &filename, std::string *contents) { void ReadBinaryFile(const std::string &filename, std::string *contents) {
std::ifstream fin(filename, std::ios::in | std::ios::binary); std::ifstream fin(filename, std::ios::in | std::ios::binary);
CHECK(fin.is_open()) << "Cannot open file: " << filename; CHECK(fin.is_open()) << "Cannot open file: " << filename;
...@@ -163,7 +161,6 @@ void LoadParam(const std::string &path, Variable *out) { ...@@ -163,7 +161,6 @@ void LoadParam(const std::string &path, Variable *out) {
LoadLoDTensor(fin, out); LoadLoDTensor(fin, out);
} }
//
bool IsPersistable(const cpp::VarDesc &var) { bool IsPersistable(const cpp::VarDesc &var) {
if (var.Persistable() && var.GetType() != VarDescAPI::Type::FEED_MINIBATCH && if (var.Persistable() && var.GetType() != VarDescAPI::Type::FEED_MINIBATCH &&
var.GetType() != VarDescAPI::Type::FETCH_LIST && var.GetType() != VarDescAPI::Type::FETCH_LIST &&
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册