GithubHelp home page GithubHelp logo

AttributeError: 'module' object has no attribute 'img_rnorm_layer' - while running image_classification demo training about paddle HOT 9 CLOSED

paddlepaddle avatar paddlepaddle commented on May 2, 2024
AttributeError: 'module' object has no attribute 'img_rnorm_layer' - while running image_classification demo training

from paddle.

Comments (9)

qingqing01 avatar qingqing01 commented on May 2, 2024

You just need to remove img_rnorm_layer in line 39 in python/paddle/trainer_config_helpers/layers.py. We have fixed it and will merge it soon.

from paddle.

deepcodingman avatar deepcodingman commented on May 2, 2024

Thanks. that problem got resolved but now I am getting another error.

[18:40 ~/paddle/src/paddle/demo/image_classification] > ./train.sh
I0902 18:40:26.984419 27728 Util.cpp:144] commandline: /home/deepbeast/paddle/bin/bin/../opt/ paddle/bin/paddle_trainer --config=vgg_16_cifar.py --dot_period=10 --log_period=100 --test_al l_data_in_one_period=1 --use_gpu=1 --trainer_count=1 --num_passes=200 --save_dir=./cifar_vgg_ model
I0902 18:40:29.325484 27728 Util.cpp:113] Calling runInitFunctions
I0902 18:40:29.325641 27728 Util.cpp:126] Call runInitFunctions done.
[INFO 2016-09-02 18:40:29,394 layers.py:1435] channels=3 size=3072
[INFO 2016-09-02 18:40:29,394 layers.py:1435] output size for conv_0 is 32
[INFO 2016-09-02 18:40:29,397 layers.py:1435] channels=64 size=65536
[INFO 2016-09-02 18:40:29,398 layers.py:1435] output size for conv_1 is 32
[INFO 2016-09-02 18:40:29,400 layers.py:1496] output size for pool_0 is 16_16
[INFO 2016-09-02 18:40:29,401 layers.py:1435] channels=64 size=16384
[INFO 2016-09-02 18:40:29,401 layers.py:1435] output size for conv_2 is 16
[INFO 2016-09-02 18:40:29,404 layers.py:1435] channels=128 size=32768
[INFO 2016-09-02 18:40:29,404 layers.py:1435] output size for conv_3 is 16
[INFO 2016-09-02 18:40:29,406 layers.py:1496] output size for pool_1 is 8_8
[INFO 2016-09-02 18:40:29,407 layers.py:1435] channels=128 size=8192
[INFO 2016-09-02 18:40:29,408 layers.py:1435] output size for conv_4 is 8
[INFO 2016-09-02 18:40:29,410 layers.py:1435] channels=256 size=16384
[INFO 2016-09-02 18:40:29,410 layers.py:1435] output size for conv_5 is 8
[INFO 2016-09-02 18:40:29,413 layers.py:1435] channels=256 size=16384
[INFO 2016-09-02 18:40:29,413 layers.py:1435] output size for conv_6 is 8
[INFO 2016-09-02 18:40:29,415 layers.py:1496] output size for pool_2 is 4_4
[INFO 2016-09-02 18:40:29,416 layers.py:1435] channels=256 size=4096
[INFO 2016-09-02 18:40:29,417 layers.py:1435] output size for conv_7 is 4
[INFO 2016-09-02 18:40:29,419 layers.py:1435] channels=512 size=8192
[INFO 2016-09-02 18:40:29,419 layers.py:1435] output size for conv_8 is 4
[INFO 2016-09-02 18:40:29,421 layers.py:1435] channels=512 size=8192
[INFO 2016-09-02 18:40:29,422 layers.py:1435] output size for conv_9 is 4
[INFO 2016-09-02 18:40:29,424 layers.py:1496] output size for pool_3 is 2_2
[INFO 2016-09-02 18:40:29,424 layers.py:1496] output size for pool_4 is 1_1
[INFO 2016-09-02 18:40:29,428 networks.py:1122] The input order is [image, label]
[INFO 2016-09-02 18:40:29,429 networks.py:1125] The output order is [cost_0]
I0902 18:40:29.442795 27728 Trainer.cpp:169] trainer mode: Normal
F0902 18:40:29.443608 27728 hl_gpu_matrix_kernel.cuh:181] Check failed: cudaSuccess == err (0 vs. 8) [hl_gpu_apply_unary_op failed] CUDA error: invalid device function
*_* Check failure stack trace: ***
@ 0x7feafca9f5cd google::LogMessage::Fail()
@ 0x7feafcaa1433 google::LogMessage::SendToLog()
@ 0x7feafca9f15b google::LogMessage::Flush()
@ 0x7feafcaa1e1e google::LogMessageFatal::~LogMessageFatal()
@ 0x7ed69c hl_gpu_apply_unary_op<>()
@ 0x7b3c3b paddle::BaseMatrixT<>::applyUnary<>()
@ 0x7b37c5 paddle::BaseMatrixT<>::applyUnary<>()
@ 0x7952ec paddle::BaseMatrixT<>::zero()
@ 0x65e3a0 paddle::Parameter::enableType()
@ 0x66e001 paddle::parameterInitNN()
@ 0x671ca5 paddle::NeuralNetwork::init()
@ 0x66797b paddle::GradientMachine::create()
@ 0x6f1cfd paddle::TrainerInternal::init()
@ 0x6eb38b paddle::Trainer::init()
@ 0x547e65 main
@ 0x7feafbc29830 __libc_start_main
@ 0x5501a9 _start
@ (nil) (unknown)
/home/deepbeast/paddle/bin/bin/paddle: line 46: 27728 Aborted (core dumped) $ {DEBUGGER} $MYDIR/../opt/paddle/bin/paddle_trainer ${@:2}
No data to plot. Exiting!

from paddle.

emailweixu avatar emailweixu commented on May 2, 2024

Can you provide your GPU card type and CUDA version? Thanks

from paddle.

deepcodingman avatar deepcodingman commented on May 2, 2024

Please see below:

[19:08 ~] > lspci -nn | grep '[03'
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GP104 [GeForce GTX 1080] [10de:1b80](rev a1)
02:00.0 VGA compatible controller [0300]: NVIDIA Corporation GP104 [GeForce GTX 1080] [10de:1b80](rev a1)

[19:08 ~] > cat /usr/local/cuda/version.txt
CUDA Version 8.0.27
[19:08 ~] >

from paddle.

gangliao avatar gangliao commented on May 2, 2024

Hi, invalid device function indicates that you have a CUDA / GPU incompatibility.
Since you use GTX 1080, you can modify CMake to fix it.

  1. open cmake/flags.cmake and add following code:

if (CUDA_VERSION VERSION_GREATER "8.0")

list(APPEND __arch_flags " -gencode arch=compute_60,code=sm_60")

endif()

  1. then, rebuild the project

from paddle.

deepcodingman avatar deepcodingman commented on May 2, 2024

Now I am getting following error during running 'make -j all'

[ 16%] Built target paddle_utils
[ 16%] Building NVCC (Device) object paddle/gserver/CMakeFiles/paddle_gserver.dir/layers/paddle_gserver_generated_LstmCompute.cu.o
[ 19%] Built target paddle_pserver
[ 19%] Built target paddle_network
[ 19%] Building NVCC (Device) object paddle/gserver/CMakeFiles/paddle_gserver.dir/layers/paddle_gserver_generated_GruCompute.cu.o
[ 23%] Built target paddle_api
[ 26%] Built target paddle_trainer_lib
[ 31%] Built target paddle_parameter
/usr/local/cuda/include/surface_functions.h(134): error: expected a ";"

/usr/local/cuda/include/surface_functions.h(135): error: expected a ";"

/usr/local/cuda/include/surface_functions.h(136): error: expected a ";"

from paddle.

gangliao avatar gangliao commented on May 2, 2024

Basically, we do not test PaddlePaddle on cuda 8.0. There maybe exist some incompatibility.
You can use make clean; cmake ..; make VERBOSE=1 to figure out where the problem comes from.

from paddle.

deepcodingman avatar deepcodingman commented on May 2, 2024

Thanks. I will give it a try again later once there is support for CUDA 8.0

from paddle.

hedaoyuan avatar hedaoyuan commented on May 2, 2024

CUDA 8.0 has support.

from paddle.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.