This repository was archived by the owner on Jan 7, 2025. It is now read-only.
Description When i run the training file, i got the error below in the last cell of the code file:
Training details:
INFO:ISR.utils.train_helper:
Training details:
training_parameters:
INFO:ISR.utils.train_helper: training_parameters:
lr_train_dir: div2k/DIV2K_train_LR_bicubic/X2/
INFO:ISR.utils.train_helper: lr_train_dir: div2k/DIV2K_train_LR_bicubic/X2/
hr_train_dir: div2k/DIV2K_train_HR/
INFO:ISR.utils.train_helper: hr_train_dir: div2k/DIV2K_train_HR/
lr_valid_dir: div2k/DIV2K_train_LR_bicubic/X2/
INFO:ISR.utils.train_helper: lr_valid_dir: div2k/DIV2K_train_LR_bicubic/X2/
hr_valid_dir: div2k/DIV2K_train_HR/
INFO:ISR.utils.train_helper: hr_valid_dir: div2k/DIV2K_train_HR/
loss_weights: {'generator': 0.0, 'feature_extractor': 0.0833, 'discriminator': 0.01}
INFO:ISR.utils.train_helper: loss_weights: {'generator': 0.0, 'feature_extractor': 0.0833, 'discriminator': 0.01}
log_dirs: {'logs': './logs', 'weights': './weights'}
INFO:ISR.utils.train_helper: log_dirs: {'logs': './logs', 'weights': './weights'}
fallback_save_every_n_epochs: 2
INFO:ISR.utils.train_helper: fallback_save_every_n_epochs: 2
dataname: div2k
INFO:ISR.utils.train_helper: dataname: div2k
n_validation: 40
INFO:ISR.utils.train_helper: n_validation: 40
flatness: {'min': 0.0, 'max': 0.15, 'increase': 0.01, 'increase_frequency': 5}
INFO:ISR.utils.train_helper: flatness: {'min': 0.0, 'max': 0.15, 'increase': 0.01, 'increase_frequency': 5}
learning_rate: {'initial_value': 0.0004, 'decay_factor': 0.5, 'decay_frequency': 30}
INFO:ISR.utils.train_helper: learning_rate: {'initial_value': 0.0004, 'decay_factor': 0.5, 'decay_frequency': 30}
adam_optimizer: {'beta1': 0.9, 'beta2': 0.999, 'epsilon': None}
INFO:ISR.utils.train_helper: adam_optimizer: {'beta1': 0.9, 'beta2': 0.999, 'epsilon': None}
losses: {'generator': 'mae', 'discriminator': 'binary_crossentropy', 'feature_extractor': 'mse'}
INFO:ISR.utils.train_helper: losses: {'generator': 'mae', 'discriminator': 'binary_crossentropy', 'feature_extractor': 'mse'}
metrics: {'generator': <function PSNR_Y at 0x7f43af969c60>}
INFO:ISR.utils.train_helper: metrics: {'generator': <function PSNR_Y at 0x7f43af969c60>}
lr_patch_size: 40
INFO:ISR.utils.train_helper: lr_patch_size: 40
steps_per_epoch: 20
INFO:ISR.utils.train_helper: steps_per_epoch: 20
batch_size: 4
INFO:ISR.utils.train_helper: batch_size: 4
starting_epoch: 0
INFO:ISR.utils.train_helper: starting_epoch: 0
generator:
INFO:ISR.utils.train_helper: generator:
name: rrdn
INFO:ISR.utils.train_helper: name: rrdn
parameters: {'C': 4, 'D': 3, 'G': 64, 'G0': 64, 'T': 10, 'x': 2}
INFO:ISR.utils.train_helper: parameters: {'C': 4, 'D': 3, 'G': 64, 'G0': 64, 'T': 10, 'x': 2}
weights_generator: None
INFO:ISR.utils.train_helper: weights_generator: None
discriminator:
INFO:ISR.utils.train_helper: discriminator:
name: srgan-large
INFO:ISR.utils.train_helper: name: srgan-large
weights_discriminator: None
INFO:ISR.utils.train_helper: weights_discriminator: None
feature_extractor:
INFO:ISR.utils.train_helper: feature_extractor:
name: vgg19
INFO:ISR.utils.train_helper: name: vgg19
layers: [5, 9]
INFO:ISR.utils.train_helper: layers: [5, 9]
WARNING:tensorflow:Model failed to serialize as JSON. Ignoring... maximum recursion depth exceeded
5/5 [==============================] - 7s 1s/step
Epoch 0/1
INFO:ISR.train.trainer:Epoch 0/1
Current learning rate: 0.00039999998989515007
INFO:ISR.train.trainer:Current learning rate: 0.00039999998989515007
0%| | 0/20 [00:00<?, ?it/s]1/1 [==============================] - 4s 4s/step
1/1 [==============================] - 0s 186ms/step
0%| | 0/20 [00:07<?, ?it/s]
TypeError Traceback (most recent call last)
in <cell line: 1>()
----> 1 trainer.train(
2 epochs=1,
3 steps_per_epoch=20,
4 batch_size=4,
5 monitored_metrics={'val_generator_PSNR_Y': 'max'}
3 frames
/usr/local/lib/python3.10/dist-packages/tensorflow/python/eager/polymorphic_function/polymorphic_function.py in _call(self, *args, **kwds)
924 # In this case we have created variables on the first call, so we run the
925 # defunned version which is guaranteed to never create variables.
--> 926 return self._no_variable_creation_fn(*args, **kwds) # pylint: disable=not-callable
927 elif self._variable_creation_fn is not None:
928 # Release the lock early so that multiple threads can perform the call
TypeError: 'NoneType' object is not callable
Reactions are currently unavailable
When i run the training file, i got the error below in the last cell of the code file:
Training details:
INFO:ISR.utils.train_helper:
Training details:
training_parameters:
INFO:ISR.utils.train_helper: training_parameters:
lr_train_dir: div2k/DIV2K_train_LR_bicubic/X2/
INFO:ISR.utils.train_helper: lr_train_dir: div2k/DIV2K_train_LR_bicubic/X2/
hr_train_dir: div2k/DIV2K_train_HR/
INFO:ISR.utils.train_helper: hr_train_dir: div2k/DIV2K_train_HR/
lr_valid_dir: div2k/DIV2K_train_LR_bicubic/X2/
INFO:ISR.utils.train_helper: lr_valid_dir: div2k/DIV2K_train_LR_bicubic/X2/
hr_valid_dir: div2k/DIV2K_train_HR/
INFO:ISR.utils.train_helper: hr_valid_dir: div2k/DIV2K_train_HR/
loss_weights: {'generator': 0.0, 'feature_extractor': 0.0833, 'discriminator': 0.01}
INFO:ISR.utils.train_helper: loss_weights: {'generator': 0.0, 'feature_extractor': 0.0833, 'discriminator': 0.01}
log_dirs: {'logs': './logs', 'weights': './weights'}
INFO:ISR.utils.train_helper: log_dirs: {'logs': './logs', 'weights': './weights'}
fallback_save_every_n_epochs: 2
INFO:ISR.utils.train_helper: fallback_save_every_n_epochs: 2
dataname: div2k
INFO:ISR.utils.train_helper: dataname: div2k
n_validation: 40
INFO:ISR.utils.train_helper: n_validation: 40
flatness: {'min': 0.0, 'max': 0.15, 'increase': 0.01, 'increase_frequency': 5}
INFO:ISR.utils.train_helper: flatness: {'min': 0.0, 'max': 0.15, 'increase': 0.01, 'increase_frequency': 5}
learning_rate: {'initial_value': 0.0004, 'decay_factor': 0.5, 'decay_frequency': 30}
INFO:ISR.utils.train_helper: learning_rate: {'initial_value': 0.0004, 'decay_factor': 0.5, 'decay_frequency': 30}
adam_optimizer: {'beta1': 0.9, 'beta2': 0.999, 'epsilon': None}
INFO:ISR.utils.train_helper: adam_optimizer: {'beta1': 0.9, 'beta2': 0.999, 'epsilon': None}
losses: {'generator': 'mae', 'discriminator': 'binary_crossentropy', 'feature_extractor': 'mse'}
INFO:ISR.utils.train_helper: losses: {'generator': 'mae', 'discriminator': 'binary_crossentropy', 'feature_extractor': 'mse'}
metrics: {'generator': <function PSNR_Y at 0x7f43af969c60>}
INFO:ISR.utils.train_helper: metrics: {'generator': <function PSNR_Y at 0x7f43af969c60>}
lr_patch_size: 40
INFO:ISR.utils.train_helper: lr_patch_size: 40
steps_per_epoch: 20
INFO:ISR.utils.train_helper: steps_per_epoch: 20
batch_size: 4
INFO:ISR.utils.train_helper: batch_size: 4
starting_epoch: 0
INFO:ISR.utils.train_helper: starting_epoch: 0
generator:
INFO:ISR.utils.train_helper: generator:
name: rrdn
INFO:ISR.utils.train_helper: name: rrdn
parameters: {'C': 4, 'D': 3, 'G': 64, 'G0': 64, 'T': 10, 'x': 2}
INFO:ISR.utils.train_helper: parameters: {'C': 4, 'D': 3, 'G': 64, 'G0': 64, 'T': 10, 'x': 2}
weights_generator: None
INFO:ISR.utils.train_helper: weights_generator: None
discriminator:
INFO:ISR.utils.train_helper: discriminator:
name: srgan-large
INFO:ISR.utils.train_helper: name: srgan-large
weights_discriminator: None
INFO:ISR.utils.train_helper: weights_discriminator: None
feature_extractor:
INFO:ISR.utils.train_helper: feature_extractor:
name: vgg19
INFO:ISR.utils.train_helper: name: vgg19
layers: [5, 9]
INFO:ISR.utils.train_helper: layers: [5, 9]
WARNING:tensorflow:Model failed to serialize as JSON. Ignoring... maximum recursion depth exceeded
5/5 [==============================] - 7s 1s/step
Epoch 0/1
INFO:ISR.train.trainer:Epoch 0/1
Current learning rate: 0.00039999998989515007
INFO:ISR.train.trainer:Current learning rate: 0.00039999998989515007
0%| | 0/20 [00:00<?, ?it/s]1/1 [==============================] - 4s 4s/step
1/1 [==============================] - 0s 186ms/step
0%| | 0/20 [00:07<?, ?it/s]
TypeError Traceback (most recent call last)
in <cell line: 1>()
----> 1 trainer.train(
2 epochs=1,
3 steps_per_epoch=20,
4 batch_size=4,
5 monitored_metrics={'val_generator_PSNR_Y': 'max'}
3 frames
/usr/local/lib/python3.10/dist-packages/tensorflow/python/eager/polymorphic_function/polymorphic_function.py in _call(self, *args, **kwds)
924 # In this case we have created variables on the first call, so we run the
925 # defunned version which is guaranteed to never create variables.
--> 926 return self._no_variable_creation_fn(*args, **kwds) # pylint: disable=not-callable
927 elif self._variable_creation_fn is not None:
928 # Release the lock early so that multiple threads can perform the call
TypeError: 'NoneType' object is not callable