Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem Running the Demo on the CPU #5

Open
karhankayan opened this issue Jul 28, 2021 · 1 comment
Open

Problem Running the Demo on the CPU #5

karhankayan opened this issue Jul 28, 2021 · 1 comment

Comments

@karhankayan
Copy link

Hello Murat,

I tried to run the code using 0 GPUs, and it gave me errors on both BEGAN and DCGAN. I am not able to test on the default 1 GPU because I don't have any. Do you know what might be causing this?

The command I entered was the following:

python main.py --causal_model big_causal_graph --is_pretrain True --model_type dcgan --is_train True --num_gpu 0

And I got the following output:

C:\Users\kayan\anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\framework\dtypes.py:455: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint8 = np.dtype([("qint8", np.int8, 1)])
C:\Users\kayan\anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\framework\dtypes.py:456: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_quint8 = np.dtype([("quint8", np.uint8, 1)])
C:\Users\kayan\anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\framework\dtypes.py:457: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint16 = np.dtype([("qint16", np.int16, 1)])
C:\Users\kayan\anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\framework\dtypes.py:458: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_quint16 = np.dtype([("quint16", np.uint16, 1)])
C:\Users\kayan\anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\framework\dtypes.py:459: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint32 = np.dtype([("qint32", np.int32, 1)])
C:\Users\kayan\anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\framework\dtypes.py:462: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
np_resource = np.dtype([("resource", np.ubyte, 1)])
tf: resetting default graph!
Loaded ./config.py
Loaded ./causal_controller/config.py
Loaded ./causal_dcgan/config.py
Loaded ./causal_began/config.py
saving config because load path not given
[] MODEL dir: logs\celebA_0728_103822
[
] PARAM path: logs\celebA_0728_103822\params.json
[] PARAM path: logs\celebA_0728_103822\cc_params.json
[
] PARAM path: logs\celebA_0728_103822\dcgan_params.json
[*] PARAM path: logs\celebA_0728_103822\began_params.json
setting up CausalController
causal graph size: 9
setting up data
setup pretrain
setting up pretrain: CausalController
causalcontroller has 58 summaries
WARNING:CausalGAN.rec_loss_coff= 0.0
Filling queue with 202 Celeb images before starting to train. I don't know how long this will take
2021-07-28 10:38:32.942722: W c:\tf_jenkins\home\workspace\release-win\device\cpu\os\windows\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE instructions, but these are available on your machine and could speed up CPU computations.
2021-07-28 10:38:32.942937: W c:\tf_jenkins\home\workspace\release-win\device\cpu\os\windows\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE2 instructions, but these are available on your machine and could speed up CPU computations.
2021-07-28 10:38:32.943087: W c:\tf_jenkins\home\workspace\release-win\device\cpu\os\windows\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE3 instructions, but these are available on your machine and could speed up CPU computations.
2021-07-28 10:38:32.943198: W c:\tf_jenkins\home\workspace\release-win\device\cpu\os\windows\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations.
2021-07-28 10:38:32.943308: W c:\tf_jenkins\home\workspace\release-win\device\cpu\os\windows\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations.
2021-07-28 10:38:32.943489: W c:\tf_jenkins\home\workspace\release-win\device\cpu\os\windows\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations.
2021-07-28 10:38:32.944325: W c:\tf_jenkins\home\workspace\release-win\device\cpu\os\windows\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX2 instructions, but these are available on your machine and could speed up CPU computations.
2021-07-28 10:38:32.945032: W c:\tf_jenkins\home\workspace\release-win\device\cpu\os\windows\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use FMA instructions, but these are available on your machine and could speed up CPU computations.
Traceback (most recent call last):
File "main.py", line 87, in
trainer=get_trainer()
File "main.py", line 74, in get_trainer
trainer=Trainer(config,cc_config,model_config)
File "C:\Users\kayan\OneDrive\Desktop\CausalGAN\trainer.py", line 95, in init
self.model.build_train_op()
File "C:\Users\kayan\OneDrive\Desktop\CausalGAN\causal_dcgan\CausalGAN.py", line 287, in build_train_op
.minimize(self.g_loss, var_list=self.g_vars)
AttributeError: 'CausalGAN' object has no attribute 'g_loss'

For the BEGAN, I ran:

python main.py --causal_model big_causal_graph --is_pretrain True --model_type began --is_train True --num_gpu 0

and got the following error:

C:\Users\kayan\anaconda3\envs\tf2\lib\site-packages\tensorflow\python\framework\dtypes.py:458: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint8 = np.dtype([("qint8", np.int8, 1)])
C:\Users\kayan\anaconda3\envs\tf2\lib\site-packages\tensorflow\python\framework\dtypes.py:459: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_quint8 = np.dtype([("quint8", np.uint8, 1)])
C:\Users\kayan\anaconda3\envs\tf2\lib\site-packages\tensorflow\python\framework\dtypes.py:460: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint16 = np.dtype([("qint16", np.int16, 1)])
C:\Users\kayan\anaconda3\envs\tf2\lib\site-packages\tensorflow\python\framework\dtypes.py:461: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_quint16 = np.dtype([("quint16", np.uint16, 1)])
C:\Users\kayan\anaconda3\envs\tf2\lib\site-packages\tensorflow\python\framework\dtypes.py:462: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint32 = np.dtype([("qint32", np.int32, 1)])
C:\Users\kayan\anaconda3\envs\tf2\lib\site-packages\tensorflow\python\framework\dtypes.py:465: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
np_resource = np.dtype([("resource", np.ubyte, 1)])
tf: resetting default graph!
Loaded ./config.py
Loaded ./causal_controller/config.py
Loaded ./causal_dcgan/config.py
Loaded ./causal_began/config.py
saving config because load path not given
[] MODEL dir: logs\celebA_0728_100704
[
] PARAM path: logs\celebA_0728_100704\params.json
[] PARAM path: logs\celebA_0728_100704\cc_params.json
[
] PARAM path: logs\celebA_0728_100704\dcgan_params.json
[*] PARAM path: logs\celebA_0728_100704\began_params.json
setting up CausalController
causal graph size: 9
setting up data
setup pretrain
setting up pretrain: CausalController
causalcontroller has 58 summaries
Filling queue with 202 Celeb images before starting to train. I don't know how long this will take
2021-07-28 10:07:14.554201: W c:\tf_jenkins\home\workspace\release-win\m\windows\py\36\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE instructions, but these are available on your machine and could speed up CPU computations.
2021-07-28 10:07:14.554405: W c:\tf_jenkins\home\workspace\release-win\m\windows\py\36\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE2 instructions, but these are available on your machine and could speed up CPU computations.
2021-07-28 10:07:14.554999: W c:\tf_jenkins\home\workspace\release-win\m\windows\py\36\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE3 instructions, but these are available on your machine and could speed up CPU computations.
2021-07-28 10:07:14.555208: W c:\tf_jenkins\home\workspace\release-win\m\windows\py\36\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations.
2021-07-28 10:07:14.555410: W c:\tf_jenkins\home\workspace\release-win\m\windows\py\36\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations.
2021-07-28 10:07:14.555604: W c:\tf_jenkins\home\workspace\release-win\m\windows\py\36\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations.
2021-07-28 10:07:14.555802: W c:\tf_jenkins\home\workspace\release-win\m\windows\py\36\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX2 instructions, but these are available on your machine and could speed up CPU computations.
2021-07-28 10:07:14.556000: W c:\tf_jenkins\home\workspace\release-win\m\windows\py\36\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use FMA instructions, but these are available on your machine and could speed up CPU computations.
Traceback (most recent call last):
File "main.py", line 87, in
trainer=get_trainer()
File "main.py", line 74, in get_trainer
trainer=Trainer(config,cc_config,model_config)
File "C:\Users\kayan\OneDrive\Desktop\CausalGAN\trainer.py", line 95, in init
self.model.build_train_op()
File "C:\Users\kayan\OneDrive\Desktop\CausalGAN\causal_began\CausalBEGAN.py", line 278, in build_train_op
g_optim = self.g_optimizer.apply_gradients(g_grads, global_step=self.step)
File "C:\Users\kayan\anaconda3\envs\tf2\lib\site-packages\tensorflow\python\training\optimizer.py", line 423, in apply_gradients
raise ValueError("No variables provided.")
ValueError: No variables provided.

@JiweiMaster
Copy link

I failed to use the dataset of download link in download.py, could you provide a new download link of your dataset, which is trained by your code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants