未验证 提交 dd428a01 编写于 作者: Y Yu Yang 提交者: GitHub

Merge pull request #10921 from reyoung/feature/change_optimizer_tests

Change optimizer to old paddle style
...@@ -202,7 +202,7 @@ endif(USE_NNPACK) ...@@ -202,7 +202,7 @@ endif(USE_NNPACK)
add_subdirectory(proto) add_subdirectory(proto)
if(NOT MOBILE_INFERENCE) if(NOT MOBILE_INFERENCE AND NOT WITH_FLUID_ONLY)
# "add_subdirectory(go)" should be placed after the following loine, # "add_subdirectory(go)" should be placed after the following loine,
# because it depends on paddle/optimizer. # because it depends on paddle/optimizer.
add_subdirectory(paddle/optimizer) add_subdirectory(paddle/optimizer)
......
...@@ -7,6 +7,10 @@ set(OPITMIZER_SRCS ...@@ -7,6 +7,10 @@ set(OPITMIZER_SRCS
sgd_optimizer.cc sgd_optimizer.cc
) )
cc_library(paddle_optimizer STATIC SRCS ${OPITMIZER_SRCS} DEPS paddle_proto glog) add_library(paddle_optimizer ${OPITMIZER_SRCS})
cc_test(serialization_test SRCS serialization_test.cc DEPS paddle_proto) target_link_libraries(paddle_optimizer paddle_proto glog)
cc_test(parameter_optimizer_test SRCS parameter_optimizer_test.cc DEPS paddle_optimizer)
if (WITH_TESTING)
add_unittest(serialization_test serialization_test.cc)
add_unittest(parameter_optimizer_test parameter_optimizer_test.cc)
endif()
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册