Hello, thank you for sharing your code! Could please help me in solving this problem?
/home/umair/.local/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:516: 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)])
/home/umair/.local/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:517: 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)])
/home/umair/.local/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:518: 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)])
/home/umair/.local/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:519: 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)])
/home/umair/.local/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:520: 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)])
/home/umair/.local/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:525: 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)])
/home/umair/.local/lib/python3.6/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:541: 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)])
/home/umair/.local/lib/python3.6/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:542: 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)])
/home/umair/.local/lib/python3.6/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:543: 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)])
/home/umair/.local/lib/python3.6/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:544: 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)])
/home/umair/.local/lib/python3.6/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:545: 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)])
/home/umair/.local/lib/python3.6/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:550: 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)])
{'DATA': {'DATA_ROOT': './data/cifar10',
'DB_SIZE': 54000,
'IMAGE_DIR': './output/cifar10_step_1_ACGAN_SCALE_G_10.0/images',
'LABEL_DIM': 10,
'LIST_ROOT': './data_list/cifar10',
'LOG_DIR': './output/cifar10_step_1_ACGAN_SCALE_G_10.0/logs',
'MAP_R': 54000,
'MODEL_DIR': './output/cifar10_step_1_ACGAN_SCALE_G_10.0/models',
'OUTPUT_DIM': 3072,
'OUTPUT_DIR': './output/cifar10_step_1_ACGAN_SCALE_G_10.0',
'TEST_SIZE': 1000,
'USE_DATASET': 'cifar10',
'WIDTH_HEIGHT': 32},
'MODEL': {'ALEXNET_PRETRAINED_MODEL_PATH': './pretrained_models/reference_pretrain.npy',
'DIM': 64,
'DIM_D': 128,
'DIM_G': 128,
'D_ARCHITECTURE': 'NORM',
'D_PRETRAINED_MODEL_PATH': '',
'G_ARCHITECTURE': 'NORM',
'G_PRETRAINED_MODEL_PATH': '',
'HASH_DIM': 64},
'TRAIN': {'ACGAN_SCALE': 1.0,
'ACGAN_SCALE_FAKE': 1.0,
'ACGAN_SCALE_G': 10.0,
'BATCH_SIZE': 64,
'CHECKPOINT_FREQUENCY': 1000,
'CROSS_ENTROPY_ALPHA': 10,
'DECAY': True,
'EVALUATE_MODE': False,
'EVAL_FREQUENCY': 10000,
'FAKE_RATIO': 1.0,
'G_LR': 0.0001,
'ITERS': 100000,
'LR': 0.0001,
'NORMED_CROSS_ENTROPY': True,
'N_CRITIC': 5,
'SAMPLE_FREQUENCY': 1000,
'WGAN_SCALE': 1.0,
'WGAN_SCALE_G': 1.0,
'WGAN_SCALE_GP': 10.0}}
WARNING:tensorflow:From main.py:40: The name tf.placeholder is deprecated. Please use tf.compat.v1.placeholder instead.
WARNING:tensorflow:From main.py:147: The name tf.random_uniform is deprecated. Please use tf.random.uniform instead.
WARNING:tensorflow:From /home/umair/HashGAN/lib/architecture.py:109: The name tf.random_normal is deprecated. Please use tf.random.normal instead.
WARNING:tensorflow:From /home/umair/HashGAN/lib/architecture.py:43: The name tf.depth_to_space is deprecated. Please use tf.compat.v1.depth_to_space instead.
WARNING:tensorflow:From /home/umair/HashGAN/lib/ops.py:125: The name tf.nn.fused_batch_norm is deprecated. Please use tf.compat.v1.nn.fused_batch_norm instead.
WARNING:tensorflow:From /home/umair/HashGAN/lib/criterion.py:26: div (from tensorflow.python.ops.math_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Deprecated in favor of operator or tf.math.divide.
WARNING:tensorflow:From /home/umair/HashGAN/lib/criterion.py:41: The name tf.log is deprecated. Please use tf.math.log instead.
WARNING:tensorflow:From main.py:72: The name tf.summary.scalar is deprecated. Please use tf.compat.v1.summary.scalar instead.
WARNING:tensorflow:From main.py:97: The name tf.train.AdamOptimizer is deprecated. Please use tf.compat.v1.train.AdamOptimizer instead.
WARNING:tensorflow:From /home/umair/.local/lib/python3.6/site-packages/tensorflow/python/ops/math_grad.py:1205: add_dispatch_support..wrapper (from tensorflow.python.ops.array_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use tf.where in 2.0, which has the same broadcast rule as np.where
WARNING:tensorflow:From main.py:100: The name tf.summary.merge is deprecated. Please use tf.compat.v1.summary.merge instead.
2019-09-30 15:36:36.266052: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2019-09-30 15:36:36.286147: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 4200000000 Hz
2019-09-30 15:36:36.286436: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x560d35ac3540 executing computations on platform Host. Devices:
2019-09-30 15:36:36.286451: I tensorflow/compiler/xla/service/service.cc:175] StreamExecutor device (0): ,
WARNING:tensorflow:From main.py:176: The name tf.summary.FileWriter is deprecated. Please use tf.compat.v1.summary.FileWriter instead.
computing param size
G Params:
generator.Input.W:0 (256,2048)
generator.Input.b:0 (2048)
generator.1.Shortcut.Filters:0 (1,1,128,128)
generator.1.Shortcut.Biases:0 (128)
generator.1.N1.offset:0 (128)
generator.1.N1.scale:0 (128)
generator.1.N1.moving_mean:0 (128) [no grad!]
generator.1.N1.moving_variance:0 (128) [no grad!]
generator.1.Conv1.Filters:0 (3,3,128,128)
generator.1.Conv1.Biases:0 (128)
generator.1.N2.offset:0 (128)
generator.1.N2.scale:0 (128)
generator.1.N2.moving_mean:0 (128) [no grad!]
generator.1.N2.moving_variance:0 (128) [no grad!]
generator.1.Conv2.Filters:0 (3,3,128,128)
generator.1.Conv2.Biases:0 (128)
generator.2.Shortcut.Filters:0 (1,1,128,128)
generator.2.Shortcut.Biases:0 (128)
generator.2.N1.offset:0 (128)
generator.2.N1.scale:0 (128)
generator.2.N1.moving_mean:0 (128) [no grad!]
generator.2.N1.moving_variance:0 (128) [no grad!]
generator.2.Conv1.Filters:0 (3,3,128,128)
generator.2.Conv1.Biases:0 (128)
generator.2.N2.offset:0 (128)
generator.2.N2.scale:0 (128)
generator.2.N2.moving_mean:0 (128) [no grad!]
generator.2.N2.moving_variance:0 (128) [no grad!]
generator.2.Conv2.Filters:0 (3,3,128,128)
generator.2.Conv2.Biases:0 (128)
generator.3.Shortcut.Filters:0 (1,1,128,128)
generator.3.Shortcut.Biases:0 (128)
generator.3.N1.offset:0 (128)
generator.3.N1.scale:0 (128)
generator.3.N1.moving_mean:0 (128) [no grad!]
generator.3.N1.moving_variance:0 (128) [no grad!]
generator.3.Conv1.Filters:0 (3,3,128,128)
generator.3.Conv1.Biases:0 (128)
generator.3.N2.offset:0 (128)
generator.3.N2.scale:0 (128)
generator.3.N2.moving_mean:0 (128) [no grad!]
generator.3.N2.moving_variance:0 (128) [no grad!]
generator.3.Conv2.Filters:0 (3,3,128,128)
generator.3.Conv2.Biases:0 (128)
generator.OutputN.offset:0 (128)
generator.OutputN.scale:0 (128)
generator.OutputN.moving_mean:0 (128) [no grad!]
generator.OutputN.moving_variance:0 (128) [no grad!]
generator.Output.Filters:0 (3,3,128,3)
generator.Output.Biases:0 (3)
Total param count: 1,468,419
D Params:
discriminator.1.Shortcut.Filters:0 (1,1,3,128)
discriminator.1.Shortcut.Biases:0 (128)
discriminator.1.Conv1.Filters:0 (3,3,3,128)
discriminator.1.Conv1.Biases:0 (128)
discriminator.1.Conv2.Filters:0 (3,3,128,128)
discriminator.1.Conv2.Biases:0 (128)
discriminator.2.Shortcut.Filters:0 (1,1,128,128)
discriminator.2.Shortcut.Biases:0 (128)
discriminator.2.Conv1.Filters:0 (3,3,128,128)
discriminator.2.Conv1.Biases:0 (128)
discriminator.2.Conv2.Filters:0 (3,3,128,128)
discriminator.2.Conv2.Biases:0 (128)
discriminator.3.Conv1.Filters:0 (3,3,128,128)
discriminator.3.Conv1.Biases:0 (128)
discriminator.3.Conv2.Filters:0 (3,3,128,128)
discriminator.3.Conv2.Biases:0 (128)
discriminator.4.Conv1.Filters:0 (3,3,128,128)
discriminator.4.Conv1.Biases:0 (128)
discriminator.4.Conv2.Filters:0 (3,3,128,128)
discriminator.4.Conv2.Biases:0 (128)
discriminator.Output.W:0 (128,1)
discriminator.Output.b:0 (1)
discriminator.ACGANOutput.W:0 (128,64)
discriminator.ACGANOutput.b:0 (64)
Total param count: 1,062,081
initializing global variables
2019-09-30 15:36:37.062999: W tensorflow/compiler/jit/mark_for_compilation_pass.cc:1412] (One-time warning): Not using XLA:CPU for cluster because envvar TF_XLA_FLAGS=--tf_xla_cpu_global_jit was not set. If you want XLA:CPU, either set that envvar, or use experimental_jit_scope to enable XLA:CPU. To confirm that XLA is active, pass --vmodule=xla_compilation_cache=1 (as a proper command-line flag, not via TF_XLA_FLAGS) or set the envvar XLA_FLAGS=--xla_hlo_profile.
WARNING:tensorflow:From main.py:187: The name tf.train.Saver is deprecated. Please use tf.compat.v1.train.Saver instead.
training
Training: 0%| | 0/100000 [00:00<?, ?it/s]cannot open train/1_3458.jpg 0 0 0 1 0 0 0 0 0 0
cannot open test/999_9471.jpg 0 0 0 0 0 0 1 0 0 0
cannot open train/4_1709.jpg 0 0 0 0 0 0 1 0 0 0
cannot open train/4_8781.jpg 0 0 0 0 1 0 0 0 0 0
cannot open test/999_2.jpg 0 0 0 0 0 0 0 0 1 0
cannot open train/4_6735.jpg 0 0 0 0 0 0 0 0 1 0
cannot open train/3_238.jpg 0 1 0 0 0 0 0 0 0 0
cannot open train/1_2437.jpg 0 0 0 0 0 0 0 1 0 0
cannot open test/999_2761.jpg 0 0 0 0 0 0 0 1 0 0
cannot open train/0_9239.jpg 0 0 0 0 0 0 0 1 0 0
cannot open test/999_7562.jpg 0 0 1 0 0 0 0 0 0 0
cannot open test/999_6229.jpg 0 0 0 0 0 0 1 0 0 0
cannot open train/2_1646.jpg 0 0 0 0 0 0 0 0 1 0
cannot open train/3_1760.jpg 0 0 0 0 0 0 0 0 0 1
cannot open train/0_185.jpg 1 0 0 0 0 0 0 0 0 0
cannot open train/0_7860.jpg 0 0 0 0 0 0 1 0 0 0
cannot open train/3_1497.jpg 0 0 0 0 0 0 0 0 1 0
cannot open test/999_9007.jpg 0 0 1 0 0 0 0 0 0 0
cannot open train/0_4707.jpg 0 0 0 0 1 0 0 0 0 0
cannot open train/4_6205.jpg 0 0 0 1 0 0 0 0 0 0
cannot open train/2_7457.jpg 0 0 0 0 0 0 0 0 0 1
cannot open train/0_4004.jpg 0 0 0 0 0 1 0 0 0 0
cannot open train/2_5493.jpg 0 0 0 0 0 0 1 0 0 0
cannot open train/1_6988.jpg 0 0 0 0 0 0 0 0 1 0
cannot open train/0_191.jpg 0 0 0 0 0 0 0 1 0 0
cannot open train/2_744.jpg 0 0 0 0 0 0 0 1 0 0
cannot open test/999_538.jpg 0 0 0 0 0 0 0 0 0 1
cannot open train/4_3470.jpg 0 0 0 0 1 0 0 0 0 0
cannot open train/3_994.jpg 0 0 0 0 0 1 0 0 0 0
cannot open train/2_7388.jpg 0 0 0 0 1 0 0 0 0 0
cannot open train/3_436.jpg 0 0 0 0 1 0 0 0 0 0
cannot open train/1_4124.jpg 1 0 0 0 0 0 0 0 0 0
cannot open train/1_1148.jpg 0 0 0 0 0 0 0 0 1 0
cannot open train/0_1428.jpg 1 0 0 0 0 0 0 0 0 0
cannot open test/999_6256.jpg 0 0 0 0 0 0 0 0 0 1
cannot open train/4_489.jpg 0 0 0 0 0 1 0 0 0 0
cannot open train/2_2163.jpg 0 1 0 0 0 0 0 0 0 0
cannot open train/0_7556.jpg 0 0 0 0 0 0 0 0 0 1
cannot open test/999_2245.jpg 0 0 0 0 0 0 0 0 1 0
cannot open test/999_9847.jpg 1 0 0 0 0 0 0 0 0 0
cannot open train/4_523.jpg 0 0 0 0 1 0 0 0 0 0
cannot open train/1_7046.jpg 0 0 0 1 0 0 0 0 0 0
cannot open train/2_9469.jpg 0 1 0 0 0 0 0 0 0 0
cannot open test/999_5002.jpg 0 0 0 0 0 0 0 0 1 0
cannot open train/2_1446.jpg 0 0 1 0 0 0 0 0 0 0
cannot open train/2_7428.jpg 0 0 0 0 1 0 0 0 0 0
cannot open train/2_3093.jpg 0 0 0 0 0 1 0 0 0 0
cannot open train/3_5260.jpg 0 0 0 0 0 0 0 0 0 1
cannot open train/2_7730.jpg 0 1 0 0 0 0 0 0 0 0
cannot open train/1_1671.jpg 1 0 0 0 0 0 0 0 0 0
cannot open train/2_4955.jpg 0 0 0 0 0 0 1 0 0 0
cannot open test/999_8755.jpg 0 0 0 0 0 0 1 0 0 0
cannot open train/2_7013.jpg 0 0 0 1 0 0 0 0 0 0
cannot open train/2_7632.jpg 0 0 0 0 0 0 1 0 0 0
cannot open train/4_5532.jpg 0 0 1 0 0 0 0 0 0 0
cannot open test/999_1762.jpg 0 0 0 0 1 0 0 0 0 0
cannot open train/1_7367.jpg 0 0 0 0 0 0 0 0 0 1
cannot open train/4_9735.jpg 1 0 0 0 0 0 0 0 0 0
cannot open train/1_1554.jpg 1 0 0 0 0 0 0 0 0 0
cannot open test/999_3533.jpg 0 0 1 0 0 0 0 0 0 0
cannot open test/999_7383.jpg 0 0 0 0 1 0 0 0 0 0
cannot open train/1_8331.jpg 0 1 0 0 0 0 0 0 0 0
cannot open train/4_5356.jpg 0 0 0 0 0 0 0 0 0 1
cannot open test/999_3276.jpg 0 0 0 0 1 0 0 0 0 0
Training: 0%| | 0/100000 [00:00<?, ?it/s]
Traceback (most recent call last):
File "main.py", line 270, in
main(config)
File "main.py", line 224, in main
summary_disc, _ = session.run([model.summary_disc, model.train_op_disc], feed_dict=get_feed_dict())
File "main.py", line 207, in get_feed_dict
labeled_data, labeled_labels = gen()
File "/home/umair/HashGAN/lib/dataloader.py", line 138, in generator
for images_iter_, labels_iter_ in gen():
File "/home/umair/HashGAN/lib/dataloader.py", line 110, in get_epoch
data = np.transpose(data, (0, 3, 1, 2))
File "<array_function internals>", line 6, in transpose
File "/home/umair/.local/lib/python3.6/site-packages/numpy/core/fromnumeric.py", line 650, in transpose
return _wrapfunc(a, 'transpose', axes)
File "/home/umair/.local/lib/python3.6/site-packages/numpy/core/fromnumeric.py", line 61, in _wrapfunc
return bound(*args, **kwds)
ValueError: axes don't match array