hi
I want to run the TrainingAnomalyDetector_public.py,
but i met problems.
Using TensorFlow backend.
WARNING:tensorflow:From /home/socialab/PycharmProjects/Master/V_master/venv/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py:17: The name tf.placeholder is deprecated. Please use tf.compat.v1.placeholder instead.
Create Model
WARNING:tensorflow:From /home/socialab/PycharmProjects/Master/V_master/venv/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py:293: calling RandomNormal.init (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.
Instructions for updating:
Call initializer instance with the dtype argument instead of passing it to the constructor
WARNING:tensorflow:From /home/socialab/PycharmProjects/Master/V_master/venv/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py:152: The name tf.get_default_graph is deprecated. Please use tf.compat.v1.get_default_graph instead.
WARNING:tensorflow:From /home/socialab/PycharmProjects/Master/V_master/venv/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py:72: The name tf.get_default_session is deprecated. Please use tf.compat.v1.get_default_session instead.
WARNING:tensorflow:From /home/socialab/PycharmProjects/Master/V_master/venv/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py:76: The name tf.Session is deprecated. Please use tf.compat.v1.Session instead.
WARNING:tensorflow:From /home/socialab/PycharmProjects/Master/V_master/venv/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py:76: The name tf.ConfigProto is deprecated. Please use tf.compat.v1.ConfigProto instead.
2020-01-26 18:48:24.480613: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 3601895000 Hz
2020-01-26 18:48:24.481023: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x4bac610 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
2020-01-26 18:48:24.481043: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version
2020-01-26 18:48:24.483435: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcuda.so.1
2020-01-26 18:48:24.627458: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2020-01-26 18:48:24.628155: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x49077b0 initialized for platform CUDA (this does not guarantee that XLA will be used). Devices:
2020-01-26 18:48:24.628175: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): GeForce GTX 1080, Compute Capability 6.1
2020-01-26 18:48:24.628333: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2020-01-26 18:48:24.628791: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1639] Found device 0 with properties:
name: GeForce GTX 1080 major: 6 minor: 1 memoryClockRate(GHz): 1.898
pciBusID: 0000:01:00.0
2020-01-26 18:48:24.628925: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libcudart.so.10.0'; dlerror: libcudart.so.10.0: cannot open shared object file: No such file or directory
2020-01-26 18:48:24.628993: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libcublas.so.10.0'; dlerror: libcublas.so.10.0: cannot open shared object file: No such file or directory
2020-01-26 18:48:24.629058: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libcufft.so.10.0'; dlerror: libcufft.so.10.0: cannot open shared object file: No such file or directory
2020-01-26 18:48:24.629123: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libcurand.so.10.0'; dlerror: libcurand.so.10.0: cannot open shared object file: No such file or directory
2020-01-26 18:48:24.629187: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libcusolver.so.10.0'; dlerror: libcusolver.so.10.0: cannot open shared object file: No such file or directory
2020-01-26 18:48:24.629252: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libcusparse.so.10.0'; dlerror: libcusparse.so.10.0: cannot open shared object file: No such file or directory
2020-01-26 18:48:24.632837: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7
2020-01-26 18:48:24.632860: W tensorflow/core/common_runtime/gpu/gpu_device.cc:1662] Cannot dlopen some GPU libraries. Please make sure the missing libraries mentioned above are installed properly if you would like to use GPU. Follow the guide at https://www.tensorflow.org/install/gpu for how to download and setup the required libraries for your platform.
Skipping registering GPU devices...
2020-01-26 18:48:24.632881: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1180] Device interconnect StreamExecutor with strength 1 edge matrix:
2020-01-26 18:48:24.632891: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1186] 0
2020-01-26 18:48:24.632899: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1199] 0: N
WARNING:tensorflow:From /home/socialab/PycharmProjects/Master/V_master/venv/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py:242: calling Constant.init (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.
Instructions for updating:
Call initializer instance with the dtype argument instead of passing it to the constructor
WARNING:tensorflow:From /home/socialab/PycharmProjects/Master/V_master/venv/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py:1463: calling dropout (from tensorflow.python.ops.nn_ops) with keep_prob is deprecated and will be removed in a future version.
Instructions for updating:
Please use rate instead of keep_prob. Rate should be set to rate = 1 - keep_prob.
WARNING:tensorflow:Large dropout rate: 0.6 (>0.5). In TensorFlow 2.x, dropout() uses dropout rate instead of keep_prob. Please ensure that this is intended.
WARNING:tensorflow:Large dropout rate: 0.6 (>0.5). In TensorFlow 2.x, dropout() uses dropout rate instead of keep_prob. Please ensure that this is intended.
Traceback (most recent call last):
File "/home/socialab/PycharmProjects/Master/V_master/anotar_imagens/AnomalyDetectionCVPR2018-master/TrainingAnomalyDetector_public.py", line 276, in
model.compile(loss=custom_objective, optimizer=adagrad)
File "/home/socialab/PycharmProjects/Master/V_master/venv/lib/python3.6/site-packages/keras/models.py", line 547, in compile
**kwargs)
File "/home/socialab/PycharmProjects/Master/V_master/venv/lib/python3.6/site-packages/keras/engine/training.py", line 622, in compile
sample_weight, mask)
File "/home/socialab/PycharmProjects/Master/V_master/venv/lib/python3.6/site-packages/keras/engine/training.py", line 324, in weighted
score_array = fn(y_true, y_pred)
File "/home/socialab/PycharmProjects/Master/V_master/anotar_imagens/AnomalyDetectionCVPR2018-master/TrainingAnomalyDetector_public.py", line 199, in custom_objective
y_true = T.flatten(y_true)
File "/home/socialab/PycharmProjects/Master/V_master/venv/lib/python3.6/site-packages/theano/tensor/basic.py", line 5276, in flatten
x_reshaped = x.reshape(dims)
AttributeError: 'Tensor' object has no attribute 'reshape'
hi I want to run the TrainingAnomalyDetector_public.py, but i met problems.
Using TensorFlow backend. WARNING:tensorflow:From /home/socialab/PycharmProjects/Master/V_master/venv/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py:17: The name tf.placeholder is deprecated. Please use tf.compat.v1.placeholder instead.
Create Model WARNING:tensorflow:From /home/socialab/PycharmProjects/Master/V_master/venv/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py:293: calling RandomNormal.init (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version. Instructions for updating: Call initializer instance with the dtype argument instead of passing it to the constructor WARNING:tensorflow:From /home/socialab/PycharmProjects/Master/V_master/venv/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py:152: The name tf.get_default_graph is deprecated. Please use tf.compat.v1.get_default_graph instead.
WARNING:tensorflow:From /home/socialab/PycharmProjects/Master/V_master/venv/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py:72: The name tf.get_default_session is deprecated. Please use tf.compat.v1.get_default_session instead.
WARNING:tensorflow:From /home/socialab/PycharmProjects/Master/V_master/venv/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py:76: The name tf.Session is deprecated. Please use tf.compat.v1.Session instead.
WARNING:tensorflow:From /home/socialab/PycharmProjects/Master/V_master/venv/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py:76: The name tf.ConfigProto is deprecated. Please use tf.compat.v1.ConfigProto instead.
2020-01-26 18:48:24.480613: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 3601895000 Hz 2020-01-26 18:48:24.481023: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x4bac610 initialized for platform Host (this does not guarantee that XLA will be used). Devices: 2020-01-26 18:48:24.481043: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version 2020-01-26 18:48:24.483435: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcuda.so.1 2020-01-26 18:48:24.627458: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero 2020-01-26 18:48:24.628155: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x49077b0 initialized for platform CUDA (this does not guarantee that XLA will be used). Devices: 2020-01-26 18:48:24.628175: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): GeForce GTX 1080, Compute Capability 6.1 2020-01-26 18:48:24.628333: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero 2020-01-26 18:48:24.628791: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1639] Found device 0 with properties: name: GeForce GTX 1080 major: 6 minor: 1 memoryClockRate(GHz): 1.898 pciBusID: 0000:01:00.0 2020-01-26 18:48:24.628925: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libcudart.so.10.0'; dlerror: libcudart.so.10.0: cannot open shared object file: No such file or directory 2020-01-26 18:48:24.628993: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libcublas.so.10.0'; dlerror: libcublas.so.10.0: cannot open shared object file: No such file or directory 2020-01-26 18:48:24.629058: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libcufft.so.10.0'; dlerror: libcufft.so.10.0: cannot open shared object file: No such file or directory 2020-01-26 18:48:24.629123: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libcurand.so.10.0'; dlerror: libcurand.so.10.0: cannot open shared object file: No such file or directory 2020-01-26 18:48:24.629187: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libcusolver.so.10.0'; dlerror: libcusolver.so.10.0: cannot open shared object file: No such file or directory 2020-01-26 18:48:24.629252: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libcusparse.so.10.0'; dlerror: libcusparse.so.10.0: cannot open shared object file: No such file or directory 2020-01-26 18:48:24.632837: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7 2020-01-26 18:48:24.632860: W tensorflow/core/common_runtime/gpu/gpu_device.cc:1662] Cannot dlopen some GPU libraries. Please make sure the missing libraries mentioned above are installed properly if you would like to use GPU. Follow the guide at https://www.tensorflow.org/install/gpu for how to download and setup the required libraries for your platform. Skipping registering GPU devices... 2020-01-26 18:48:24.632881: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1180] Device interconnect StreamExecutor with strength 1 edge matrix: 2020-01-26 18:48:24.632891: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1186] 0 2020-01-26 18:48:24.632899: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1199] 0: N WARNING:tensorflow:From /home/socialab/PycharmProjects/Master/V_master/venv/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py:242: calling Constant.init (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version. Instructions for updating: Call initializer instance with the dtype argument instead of passing it to the constructor WARNING:tensorflow:From /home/socialab/PycharmProjects/Master/V_master/venv/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py:1463: calling dropout (from tensorflow.python.ops.nn_ops) with keep_prob is deprecated and will be removed in a future version. Instructions for updating: Please use
model.compile(loss=custom_objective, optimizer=adagrad)
File "/home/socialab/PycharmProjects/Master/V_master/venv/lib/python3.6/site-packages/keras/models.py", line 547, in compile
**kwargs)
File "/home/socialab/PycharmProjects/Master/V_master/venv/lib/python3.6/site-packages/keras/engine/training.py", line 622, in compile
sample_weight, mask)
File "/home/socialab/PycharmProjects/Master/V_master/venv/lib/python3.6/site-packages/keras/engine/training.py", line 324, in weighted
score_array = fn(y_true, y_pred)
File "/home/socialab/PycharmProjects/Master/V_master/anotar_imagens/AnomalyDetectionCVPR2018-master/TrainingAnomalyDetector_public.py", line 199, in custom_objective
y_true = T.flatten(y_true)
File "/home/socialab/PycharmProjects/Master/V_master/venv/lib/python3.6/site-packages/theano/tensor/basic.py", line 5276, in flatten
x_reshaped = x.reshape(dims)
AttributeError: 'Tensor' object has no attribute 'reshape'
rate
instead ofkeep_prob
. Rate should be set torate = 1 - keep_prob
. WARNING:tensorflow:Large dropout rate: 0.6 (>0.5). In TensorFlow 2.x, dropout() uses dropout rate instead of keep_prob. Please ensure that this is intended. WARNING:tensorflow:Large dropout rate: 0.6 (>0.5). In TensorFlow 2.x, dropout() uses dropout rate instead of keep_prob. Please ensure that this is intended. Traceback (most recent call last): File "/home/socialab/PycharmProjects/Master/V_master/anotar_imagens/AnomalyDetectionCVPR2018-master/TrainingAnomalyDetector_public.py", line 276, in