tf.extra_losses
tf.extra_losses copied to clipboard
error in 'make'
When I run 'make' in build directory , there some errors:
[100%] Linking CXX shared library libextra_losses.so /usr/bin/ld: 找不到 -ltensorflow_framework collect2: error: ld returned 1 exit status CMakeFiles/extra_losses.dir/build.make:166: recipe for target 'libextra_losses.so' failed make[2]: *** [libextra_losses.so] Error 1 CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/extra_losses.dir/all' failed make[1]: *** [CMakeFiles/extra_losses.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: *** [all] Error 2
do you know the reason? thank you for your help.
ubuntu16.04+python3.6(anaconda3)+tensorflow1.6 thank you very much.
@czy36mengfei cmake的输出看一下
学长好,
cmake输出如下
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found CUDA: /usr/local/cuda-9.0 (found version "9.0")
-- Found CWD: /home/cciip/install_package/tf.extra_losses-master/build
-- Found GPU_CAPABILITY: gencode arch=compute_61,code=sm_61
Traceback (most recent call last):
File "
是因为我的tensorflow是anoconda的python安装的,所以导入tensorflow失败吗?有什么解决的方案吗?
thanks from Huster
@czy36mengfei 看一下python命令默认是哪个环境?tensorflow,TF_LIB都没找到
@czy36mengfei 看一下python命令默认是哪个环境?tensorflow,TF_LIB都没找到
十分感谢您的解答。我发现CMakeLists里调用的是python3.5而不是默认的python,我把它改成python就可以了。
不过在跑test_op.py测试的时候出现了新的问题: *** Begin stack trace *** tensorflow::CurrentStackTrace()
std::_Function_handler<void (long long, long long), LargeMarginSoftmaxFunctor<Eigen::ThreadPoolDevice, float>::operator()(tensorflow::OpKernelContext*, Eigen::ThreadPoolDevice const&, Eigen::TensorMap<Eigen::Tensor<float const, 1, 1, long>, 16, Eigen::MakePointer>, Eigen::TensorMap<Eigen::Tensor<float const, 1, 1, long>, 16, Eigen::MakePointer>, Eigen::TensorMap<Eigen::Tensor<int const, 1, 1, long>, 16, Eigen::MakePointer>, Eigen::TensorMap<Eigen::Tensor<int const, 1, 1, long>, 16, Eigen::MakePointer>, int, int, int, float, float, float, float, int, bool, Eigen::TensorMap<Eigen::Tensor<float, 1, 1, long>, 16, Eigen::MakePointer>, Eigen::TensorMap<Eigen::Tensor<float, 1, 1, long>, 16, Eigen::MakePointer>, Eigen::TensorMap<Eigen::Tensor<float, 1, 1, long>, 16, Eigen::MakePointer>, Eigen::TensorMap<Eigen::Tensor<float, 1, 1, long>, 16, Eigen::MakePointer>, Eigen::TensorMap<Eigen::Tensor<float, 1, 1, long>, 16, Eigen::MakePointer>, Eigen::TensorMap<Eigen::Tensor<float, 1, 1, long>, 16, Eigen::MakePointer>)::{lambda(long, long)#1}>::_M_invoke(std::_Any_data const&, long long&&, std::_Any_data const&)
tensorflow::thread::ThreadPool::Impl::ParallelFor(long long, long long, std::function<void (long long, long long)>)
tensorflow::thread::ThreadPool::ParallelFor(long long, long long, std::function<void (long long, long long)>)
tensorflow::Shard(int, tensorflow::thread::ThreadPool*, long long, long long, std::function<void (long long, long long)>)
LargeMarginSoftmaxFunctor<Eigen::ThreadPoolDevice, float>::operator()(tensorflow::OpKernelContext*, Eigen::ThreadPoolDevice const&, Eigen::TensorMap<Eigen::Tensor<float const, 1, 1, long>, 16, Eigen::MakePointer>, Eigen::TensorMap<Eigen::Tensor<float const, 1, 1, long>, 16, Eigen::MakePointer>, Eigen::TensorMap<Eigen::Tensor<int const, 1, 1, long>, 16, Eigen::MakePointer>, Eigen::TensorMap<Eigen::Tensor<int const, 1, 1, long>, 16, Eigen::MakePointer>, int, int, int, float, float, float, float, int, bool, Eigen::TensorMap<Eigen::Tensor<float, 1, 1, long>, 16, Eigen::MakePointer>, Eigen::TensorMap<Eigen::Tensor<float, 1, 1, long>, 16, Eigen::MakePointer>, Eigen::TensorMap<Eigen::Tensor<float, 1, 1, long>, 16, Eigen::MakePointer>, Eigen::TensorMap<Eigen::Tensor<float, 1, 1, long>, 16, Eigen::MakePointer>, Eigen::TensorMap<Eigen::Tensor<float, 1, 1, long>, 16, Eigen::MakePointer>, Eigen::TensorMap<Eigen::Tensor<float, 1, 1, long>, 16, Eigen::MakePointer>)
LargeMarginSoftmaxOp<Eigen::ThreadPoolDevice, float>::Compute(tensorflow::OpKernelContext*)
tensorflow::ThreadPoolDevice::Compute(tensorflow::OpKernel*, tensorflow::OpKernelContext*)
Eigen::NonBlockingThreadPoolTempl<tensorflow::thread::EigenEnvironment>::WorkerLoop(int)
std::_Function_handler<void (), tensorflow::thread::EigenEnvironment::CreateThread(std::function<void ()>)::{lambda()#1}>::_M_invoke(std::_Any_data const&)
clone
*** End stack trace *** 已放弃 (核心已转储)
里面没有具体的错误信息,所以不知道是什么问题,望解答。