Hi, I defined a multitask learning problem by fusion of PTB and IMDB for testing the mixing of different type of modality problems. But when the training goes to the line 444 of multi_problem.py is throws an error because the loss expects 5 arguments instead of 6.
Is some miss configuration by my side or it's a code error??
EDIT: After checking some revisions I realized it was changed and originally the line 444 from multi_problem.py was:
@registry.register_problem
class MultiSentimentPTB(multi_problem.MultiProblem):
"""Mixed problem between PTB and NER"""
def __init__(self, was_reversed=False, was_copy=False):
super(MultiSentimentPTB, self).__init__(
was_reversed, was_copy)
self.task_list.append(ptb.LanguagemodelPtb10k())
self.task_list.append(imdb.SentimentIMDB())
@property
def use_vocab_from_other_problem(self):
return ptb.LanguagemodelPtb10k()
@property
def vocab_type(self):
return text_problems.VocabType.TOKEN
...
And I'm running a transformer with transformer_tall_finetune_textclass
# Error logs:
File "/Users/harvatmykola/University/Otherprojects/tensor2tensor/venv/lib/python3.7/site-packages/tensorflow_estimator/pyth File "/Users/harvatmykola/University/Otherprojects/tensor2tensor/venv/lib/python3.7/site-packages/tensorflow_estimator/pyth File "/Users/harvatmykola/Universitity/Oth File "/Users/harvatmykolen File "/Users/harvatmykola/University/Otherprojects/tensor2tensor/venv/lib/python3.7/site-packag_call_model_fn
model_fn_results = self._model_fn(features=features, **kwargs)
File "/Users/harvatmykola/Univers File "/Users/harvatmykola/Univers File "/Users/harvatmykola/Univers File "/Users/harvatmykola/Univers File "/Users/harvatmykola/Univers File "/Users/harvatmy use_tpu=use_tpu)
File "/Users/harvatmykola/University/Otherprojects/tensor2tensor/venv/lib/python3.7/site-packages/tensor2tensor-1.13.0-py3.7.egg/tensor2tensor/utils/t2t_model.py", line 1466, in estimator_model_fn
logits, losses_dict = model(f logits, losses_dict = model(f logits, los"/Users/harvatmykola/University/Otherprojects/tensor2tensor/venv/lib/python3.7/site-packages/tensorflow/python/layers/base.py", line 530, in __call__
outputs = super(Layer, self).__call__(inputs, *args, **kwargs)
File "/Users/harvatmykola/University/Otherprojects/tensor2tensor/venv/lib/python3.7/site-packages/tensorflow/python/keras/engine/base_layer.py", line 554, in __call__
outputs = self.call(inputs, *args, **kwargs)
File "/Users/harvatmykola/University/Otherprojects/tensor2tensor/venv/lib/python3.7/site-packages/tensor2tensor-1.13.0-py3.7.egg/tensor2tensor/utils/t2t_model.py", line 322, in call
/multi_problem.py", line 447, in aggregate_task_lossessor2tensor/data_generators
(venv) Harvats-MacBook-Pro:Otherprojects harvatmykola$
(venv) Harvats-MacBook-Pro:Otherprojects harvatmykola$ ./train.sh
WARNING: The TensorFlow contrib module will not be included in TensorFlow 2.0.
For more information, please see:
* https://github.com/tensorflow/community/blob/master/rfcs/20180907-contrib-sunset.md
* https://github.com/tensorflow/addons
If you depend on functionality not listed there, please file an issue.
INFO:tensorflow:Loading hparams from existing json tests/train_dir/hparams.json
I0509 16:02:09.850034 4690019776 hparams_lib.py:64] Loading hparams from existing json tests/train_dir/hparams.json
WARNING:tensorflow:From /Users/harvatmykola/University/Otherprojects/tensor2tensor/venv/lib/python3.7/site-packages/tensor2tensor-1.13.0-py3.7.egg/tensor2tensor/utils/trainer_lib.py:240: RunConfig.__init__ (from tensorflow.contrib.learn.python.learn.estimators.run_config) is deprecated and will be removed in a future version.
Instructions for updating:
When switching to tf.estimator.Estimator, use tf.estimator.RunConfig instead.
W0509 16:02:09.854287 4690019776 deprecation.py:323] From /Users/harvatmykola/University/Otherprojects/tensor2tensor/venv/lib/python3.7/site-packages/tensor2tensor-1.13.0-py3.7.egg/tensor2tensor/utils/trainer_lib.py:240: RunConfig.__init__ (from tensorflow.contrib.learn.python.learn.estimators.run_config) is deprecated and will be removed in a future version.
Instructions for updating:
When switching to tf.estimator.Estimator, use tf.estimator.RunConfig instead.
INFO:tensorflow:Configuring DataParallelism to replicate the model.
I0509 16:02:09.854696 4690019776 trainer_lib.py:263] Configuring DataParallelism to replicate the model.
INFO:tensorflow:schedule=continuous_train_and_eval
I0509 16:02:09.854915 4690019776 devices.py:76] schedule=continuous_train_and_eval
INFO:tensorflow:worker_gpu=1
I0509 16:02:09.855040 4690019776 devices.py:77] worker_gpu=1
INFO:tensorflow:sync=False
I0509 16:02:09.855165 4690019776 devices.py:78] sync=False
WARNING:tensorflow:Schedule=continuous_train_and_eval. Assuming that training is running on a single machine.
W0509 16:02:09.855312 4690019776 tf_logging.py:161] Schedule=continuous_train_and_eval. Assuming that training is running on a single machine.
INFO:tensorflow:datashard_devices: ['gpu:0']
I0509 16:02:09.855558 4690019776 devices.py:170] datashard_devices: ['gpu:0']
INFO:tensorflow:caching_devices: None
I0509 16:02:09.855748 4690019776 devices.py:171] caching_devices: None
INFO:tensorflow:ps_devices: ['gpu:0']
I0509 16:02:09.855940 4690019776 devices.py:172] ps_devices: ['gpu:0']
INFO:tensorflow:Old vocabulary size: 10000
I0509 16:02:09.892567 4690019776 multi_problem.py:171] Old vocabulary size: 10000
INFO:tensorflow:Task 0 (languagemodel_ptb10k) has id 10000.
I0509 16:02:09.892880 4690019776 multi_problem.py:397] Task 0 (languagemodel_ptb10k) has id 10000.
INFO:tensorflow:Task 1 (sentiment_imdb) has id 10001.
I0509 16:02:09.893158 4690019776 multi_problem.py:397] Task 1 (sentiment_imdb) has id 10001.
INFO:tensorflow:New vocabulary size: 65536
I0509 16:02:09.893364 4690019776 multi_problem.py:173] New vocabulary size: 65536
INFO:tensorflow:Using config: {'_task_type': None, '_task_id': 0, '_cluster_spec': <tensorflow.python.training.server_lib.ClusterSpec object at 0x133b0e400>, '_master': '', '_num_ps_replicas': 0, '_num_worker_replicas': 0, '_environment': 'local', '_is_chief': True, '_evaluation_master': '', '_train_distribute': None, '_eval_distribute': None, '_device_fn': None, '_tf_config': gpu_options {
per_process_gpu_memory_fraction: 1.0
}
, '_tf_random_seed': None, '_save_summary_steps': 100, '_save_checkpoints_secs': None, '_log_step_count_steps': 100, '_protocol': None, '_session_config': gpu_options {
per_process_gpu_memory_fraction: 0.95
}
allow_soft_placement: true
graph_options {
optimizer_options {
global_jit_level: OFF
}
}
isolate_session_state: true
, '_save_checkpoints_steps': 1000, '_keep_checkpoint_max': 20, '_keep_checkpoint_every_n_hours': 10000, '_model_dir': 'tests/train_dir', 'use_tpu': False, 't2t_device_info': {'num_async_replicas': 1}, 'data_parallelism': <tensor2tensor.utils.expert_utils.Parallelism object at 0x133b0e748>}
I0509 16:02:09.893856 4690019776 estimator.py:201] Using config: {'_task_type': None, '_task_id': 0, '_cluster_spec': <tensorflow.python.training.server_lib.ClusterSpec object at 0x133b0e400>, '_master': '', '_num_ps_replicas': 0, '_num_worker_replicas': 0, '_environment': 'local', '_is_chief': True, '_evaluation_master': '', '_train_distribute': None, '_eval_distribute': None, '_device_fn': None, '_tf_config': gpu_options {
per_process_gpu_memory_fraction: 1.0
}
, '_tf_random_seed': None, '_save_summary_steps': 100, '_save_checkpoints_secs': None, '_log_step_count_steps': 100, '_protocol': None, '_session_config': gpu_options {
per_process_gpu_memory_fraction: 0.95
}
allow_soft_placement: true
graph_options {
optimizer_options {
global_jit_level: OFF
}
}
isolate_session_state: true
, '_save_checkpoints_steps': 1000, '_keep_checkpoint_max': 20, '_keep_checkpoint_every_n_hours': 10000, '_model_dir': 'tests/train_dir', 'use_tpu': False, 't2t_device_info': {'num_async_replicas': 1}, 'data_parallelism': <tensor2tensor.utils.expert_utils.Parallelism object at 0x133b0e748>}
WARNING:tensorflow:Estimator's model_fn (<function T2TModel.make_estimator_model_fn.<locals>.wrapping_model_fn at 0x133b05510>) includes params argument, but params are not passed to Estimator.
W0509 16:02:09.894332 4690019776 estimator.py:1924] Estimator's model_fn (<function T2TModel.make_estimator_model_fn.<locals>.wrapping_model_fn at 0x133b05510>) includes params argument, but params are not passed to Estimator.
WARNING:tensorflow:ValidationMonitor only works with --schedule=train_and_evaluate
W0509 16:02:09.894678 4690019776 tf_logging.py:161] ValidationMonitor only works with --schedule=train_and_evaluate
INFO:tensorflow:Not using Distribute Coordinator.
I0509 16:02:09.897998 4690019776 estimator_training.py:185] Not using Distribute Coordinator.
INFO:tensorflow:Running training and evaluation locally (non-distributed).
I0509 16:02:09.898458 4690019776 training.py:610] Running training and evaluation locally (non-distributed).
INFO:tensorflow:Start train and evaluate loop. The evaluate will happen after every checkpoint. Checkpoint frequency is determined based on RunConfig arguments: save_checkpoints_steps 1000 or save_checkpoints_secs None.
I0509 16:02:09.898897 4690019776 training.py:698] Start train and evaluate loop. The evaluate will happen after every checkpoint. Checkpoint frequency is determined based on RunConfig arguments: save_checkpoints_steps 1000 or save_checkpoints_secs None.
WARNING:tensorflow:From /Users/harvatmykola/University/Otherprojects/tensor2tensor/venv/lib/python3.7/site-packages/tensorflow/python/framework/op_def_library.py:263: colocate_with (from tensorflow.python.framework.ops) is deprecated and will be removed in a future version.
Instructions for updating:
Colocations handled automatically by placer.
W0509 16:02:09.903387 4690019776 deprecation.py:323] From /Users/harvatmykola/University/Otherprojects/tensor2tensor/venv/lib/python3.7/site-packages/tensorflow/python/framework/op_def_library.py:263: colocate_with (from tensorflow.python.framework.ops) is deprecated and will be removed in a future version.
Instructions for updating:
Colocations handled automatically by placer.
INFO:tensorflow:Task 0 (languagemodel_ptb10k) has id 10000.
I0509 16:02:09.946523 4690019776 multi_problem.py:397] Task 0 (languagemodel_ptb10k) has id 10000.
INFO:tensorflow:Task 1 (sentiment_imdb) has id 10001.
I0509 16:02:09.946745 4690019776 multi_problem.py:397] Task 1 (sentiment_imdb) has id 10001.
INFO:tensorflow:Reading data files from tests/data_dir/languagemodel_ptb10k-train*
I0509 16:02:09.946970 4690019776 problem.py:639] Reading data files from tests/data_dir/languagemodel_ptb10k-train*
INFO:tensorflow:partition: 0 num_data_files: 10
I0509 16:02:09.948379 4690019776 problem.py:665] partition: 0 num_data_files: 10
INFO:tensorflow:Reading data files from tests/data_dir/sentiment_imdb-train*
I0509 16:02:10.050817 4690019776 problem.py:639] Reading data files from tests/data_dir/sentiment_imdb-train*
INFO:tensorflow:partition: 0 num_data_files: 10
I0509 16:02:10.052222 4690019776 problem.py:665] partition: 0 num_data_files: 10
INFO:tensorflow:Using the pretrain schedule to train the MultiProblem.
I0509 16:02:10.278352 4690019776 multi_problem.py:301] Using the pretrain schedule to train the MultiProblem.
INFO:tensorflow:Schedule mixing threshold 0.50
I0509 16:02:10.278795 4690019776 multi_problem.py:303] Schedule mixing threshold 0.50
INFO:tensorflow:Generating multi problem filepattern
I0509 16:02:10.302627 4690019776 multi_problem.py:157] Generating multi problem filepattern
WARNING:tensorflow:From /Users/harvatmykola/University/Otherprojects/tensor2tensor/venv/lib/python3.7/site-packages/tensor2tensor-1.13.0-py3.7.egg/tensor2tensor/utils/data_reader.py:275: tf_record_iterator (from tensorflow.python.lib.io.tf_record) is deprecated and will be removed in a future version.
Instructions for updating:
Use eager execution and:
`tf.data.TFRecordDataset(path)`
W0509 16:02:10.306353 4690019776 deprecation.py:323] From /Users/harvatmykola/University/Otherprojects/tensor2tensor/venv/lib/python3.7/site-packages/tensor2tensor-1.13.0-py3.7.egg/tensor2tensor/utils/data_reader.py:275: tf_record_iterator (from tensorflow.python.lib.io.tf_record) is deprecated and will be removed in a future version.
Instructions for updating:
Use eager execution and:
`tf.data.TFRecordDataset(path)`
WARNING:tensorflow:From /Users/harvatmykola/University/Otherprojects/tensor2tensor/venv/lib/python3.7/site-packages/tensor2tensor-1.13.0-py3.7.egg/tensor2tensor/utils/data_reader.py:37: to_int32 (from tensorflow.python.ops.math_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use tf.cast instead.
W0509 16:02:10.351011 4690019776 deprecation.py:323] From /Users/harvatmykola/University/Otherprojects/tensor2tensor/venv/lib/python3.7/site-packages/tensor2tensor-1.13.0-py3.7.egg/tensor2tensor/utils/data_reader.py:37: to_int32 (from tensorflow.python.ops.math_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use tf.cast instead.
WARNING:tensorflow:Shapes are not fully defined. Assuming batch_size means tokens.
W0509 16:02:10.357803 4690019776 data_reader.py:399] Shapes are not fully defined. Assuming batch_size means tokens.
WARNING:tensorflow:From /Users/harvatmykola/University/Otherprojects/tensor2tensor/venv/lib/python3.7/site-packages/tensor2tensor-1.13.0-py3.7.egg/tensor2tensor/utils/data_reader.py:233: to_float (from tensorflow.python.ops.math_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use tf.cast instead.
W0509 16:02:10.480849 4690019776 deprecation.py:323] From /Users/harvatmykola/University/Otherprojects/tensor2tensor/venv/lib/python3.7/site-packages/tensor2tensor-1.13.0-py3.7.egg/tensor2tensor/utils/data_reader.py:233: to_float (from tensorflow.python.ops.math_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use tf.cast instead.
INFO:tensorflow:Calling model_fn.
I0509 16:02:10.558959 4690019776 estimator.py:1111] Calling model_fn.
INFO:tensorflow:Setting T2TModel mode to 'train'
I0509 16:02:10.585413 4690019776 t2t_model.py:2087] Setting T2TModel mode to 'train'
INFO:tensorflow:Using variable initializer: uniform_unit_scaling
I0509 16:02:10.685844 4690019776 optimize.py:358] Using variable initializer: uniform_unit_scaling
INFO:tensorflow:Transforming feature 'targets' with symbol_modality_65536_768.targets_bottom
I0509 16:02:10.784312 4690019776 t2t_model.py:2087] Transforming feature 'targets' with symbol_modality_65536_768.targets_bottom
WARNING:tensorflow:From /Users/harvatmykola/University/Otherprojects/tensor2tensor/venv/lib/python3.7/site-packages/tensorflow/python/framework/function.py:1007: calling Graph.create_op (from tensorflow.python.framework.ops) with compute_shapes is deprecated and will be removed in a future version.
Instructions for updating:
Shapes are always computed; don't use the compute_shapes as it has no effect.
W0509 16:02:10.963997 4690019776 deprecation.py:506] From /Users/harvatmykola/University/Otherprojects/tensor2tensor/venv/lib/python3.7/site-packages/tensorflow/python/framework/function.py:1007: calling Graph.create_op (from tensorflow.python.framework.ops) with compute_shapes is deprecated and will be removed in a future version.
Instructions for updating:
Shapes are always computed; don't use the compute_shapes as it has no effect.
INFO:tensorflow:Building model body
I0509 16:02:10.971387 4690019776 t2t_model.py:2087] Building model body
WARNING:tensorflow:From /Users/harvatmykola/University/Otherprojects/tensor2tensor/venv/lib/python3.7/site-packages/tensor2tensor-1.13.0-py3.7.egg/tensor2tensor/models/transformer.py:150: 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`.
W0509 16:02:11.070785 4690019776 deprecation.py:506] From /Users/harvatmykola/University/Otherprojects/tensor2tensor/venv/lib/python3.7/site-packages/tensor2tensor-1.13.0-py3.7.egg/tensor2tensor/models/transformer.py:150: 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`.
INFO:tensorflow:Transforming body output with symbol_modality_65536_768.top
I0509 16:02:16.367497 4690019776 t2t_model.py:2087] Transforming body output with symbol_modality_65536_768.top
Traceback (most recent call last):
File "/Users/harvatmykola/University/Otherprojects/tensor2tensor/venv/bin/t2t-trainer", line 4, in <module>
__import__('pkg_resources').run_script('tensor2tensor==1.13.0', 't2t-trainer')
File "/Users/harvatmykola/University/Otherprojects/tensor2tensor/venv/lib/python3.7/site-packages/setuptools-40.8.0-py3.7.egg/pkg_resources/__init__.py", line 666, in run_script
File "/Users/harvatmykola/University/Otherprojects/tensor2tensor/venv/lib/python3.7/site-packages/setuptools-40.8.0-py3.7.egg/pkg_resources/__init__.py", line 1446, in run_script
File "/Users/harvatmykola/University/Otherprojects/tensor2tensor/venv/lib/python3.7/site-packages/tensor2tensor-1.13.0-py3.7.egg/EGG-INFO/scripts/t2t-trainer", line 33, in <module>
tf.app.run()
File "/Users/harvatmykola/University/Otherprojects/tensor2tensor/venv/lib/python3.7/site-packages/tensorflow/python/platform/app.py", line 125, in run
_sys.exit(main(argv))
File "/Users/harvatmykola/University/Otherprojects/tensor2tensor/venv/lib/python3.7/site-packages/tensor2tensor-1.13.0-py3.7.egg/EGG-INFO/scripts/t2t-trainer", line 28, in main
t2t_trainer.main(argv)
File "/Users/harvatmykola/University/Otherprojects/tensor2tensor/venv/lib/python3.7/site-packages/tensor2tensor-1.13.0-py3.7.egg/tensor2tensor/bin/t2t_trainer.py", line 439, in main
execute_schedule(exp)
File "/Users/harvatmykola/University/Otherprojects/tensor2tensor/venv/lib/python3.7/site-packages/tensor2tensor-1.13.0-py3.7.egg/tensor2tensor/bin/t2t_trainer.py", line 358, in execute_schedule
getattr(exp, FLAGS.schedule)()
File "/Users/harvatmykola/University/Otherprojects/tensor2tensor/venv/lib/python3.7/site-packages/tensor2tensor-1.13.0-py3.7.egg/tensor2tensor/utils/trainer_lib.py", line 400, in continuous_train_and_eval
self._eval_spec)
File "/Users/harvatmykola/University/Otherprojects/tensor2tensor/venv/lib/python3.7/site-packages/tensorflow_estimator/python/estimator/training.py", line 471, in train_and_evaluate
return executor.run()
File "/Users/harvatmykola/University/Otherprojects/tensor2tensor/venv/lib/python3.7/site-packages/tensorflow_estimator/python/estimator/training.py", line 611, in run
return self.run_local()
File "/Users/harvatmykola/University/Otherprojects/tensor2tensor/venv/lib/python3.7/site-packages/tensorflow_estimator/python/estimator/training.py", line 712, in run_local
saving_listeners=saving_listeners)
File "/Users/harvatmykola/University/Otherprojects/tensor2tensor/venv/lib/python3.7/site-packages/tensorflow_estimator/python/estimator/estimator.py", line 358, in train
loss = self._train_model(input_fn, hooks, saving_listeners)
File "/Users/harvatmykola/University/Otherprojects/tensor2tensor/venv/lib/python3.7/site-packages/tensorflow_estimator/python/estimator/estimator.py", line 1124, in _train_model
return self._train_model_default(input_fn, hooks, saving_listeners)
File "/Users/harvatmykola/University/Otherprojects/tensor2tensor/venv/lib/python3.7/site-packages/tensorflow_estimator/python/estimator/estimator.py", line 1154, in _train_model_default
features, labels, model_fn_lib.ModeKeys.TRAIN, self.config)
File "/Users/harvatmykola/University/Otherprojects/tensor2tensor/venv/lib/python3.7/site-packages/tensorflow_estimator/python/estimator/estimator.py", line 1112, in _call_model_fn
model_fn_results = self._model_fn(features=features, **kwargs)
File "/Users/harvatmykola/University/Otherprojects/tensor2tensor/venv/lib/python3.7/site-packages/tensor2tensor-1.13.0-py3.7.egg/tensor2tensor/utils/t2t_model.py", line 1405, in wrapping_model_fn
use_tpu=use_tpu)
File "/Users/harvatmykola/University/Otherprojects/tensor2tensor/venv/lib/python3.7/site-packages/tensor2tensor-1.13.0-py3.7.egg/tensor2tensor/utils/t2t_model.py", line 1466, in estimator_model_fn
logits, losses_dict = model(features) # pylint: disable=not-callable
File "/Users/harvatmykola/University/Otherprojects/tensor2tensor/venv/lib/python3.7/site-packages/tensorflow/python/layers/base.py", line 530, in __call__
outputs = super(Layer, self).__call__(inputs, *args, **kwargs)
File "/Users/harvatmykola/University/Otherprojects/tensor2tensor/venv/lib/python3.7/site-packages/tensorflow/python/keras/engine/base_layer.py", line 554, in __call__
outputs = self.call(inputs, *args, **kwargs)
File "/Users/harvatmykola/University/Otherprojects/tensor2tensor/venv/lib/python3.7/site-packages/tensor2tensor-1.13.0-py3.7.egg/tensor2tensor/utils/t2t_model.py", line 322, in call
sharded_logits, losses = self.model_fn_sharded(sharded_features)
File "/Users/harvatmykola/University/Otherprojects/tensor2tensor/venv/lib/python3.7/site-packages/tensor2tensor-1.13.0-py3.7.egg/tensor2tensor/utils/t2t_model.py", line 383, in model_fn_sharded
sharded_logits, sharded_losses = dp(self.model_fn, datashard_to_features)
File "/Users/harvatmykola/University/Otherprojects/tensor2tensor/venv/lib/python3.7/site-packages/tensor2tensor-1.13.0-py3.7.egg/tensor2tensor/utils/expert_utils.py", line 231, in __call__
outputs.append(fns[i](*my_args[i], **my_kwargs[i]))
File "/Users/harvatmykola/University/Otherprojects/tensor2tensor/venv/lib/python3.7/site-packages/tensor2tensor-1.13.0-py3.7.egg/tensor2tensor/utils/t2t_model.py", line 431, in model_fn
losses["training"] = self.loss(logits, features)
File "/Users/harvatmykola/University/Otherprojects/tensor2tensor/venv/lib/python3.7/site-packages/tensor2tensor-1.13.0-py3.7.egg/tensor2tensor/utils/t2t_model.py", line 700, in loss
weights=features.get("targets_mask"))
File "/Users/harvatmykola/University/Otherprojects/tensor2tensor/venv/lib/python3.7/site-packages/tensor2tensor-1.13.0-py3.7.egg/tensor2tensor/utils/t2t_model.py", line 666, in _loss_single
feature
File "/Users/harvatmykola/University/Otherprojects/tensor2tensor/venv/lib/python3.7/site-packages/tensor2tensor-1.13.0-py3.7.egg/tensor2tensor/data_generators/multi_problem.py", line 447, in aggregate_task_losses
hparams, vocab_size, weights_fn)
TypeError: generic_loss() takes 5 positional arguments but 6 were given
Description
Hi, I defined a multitask learning problem by fusion of PTB and IMDB for testing the mixing of different type of modality problems. But when the training goes to the line 444 of multi_problem.py is throws an error because the loss expects 5 arguments instead of 6. Is some miss configuration by my side or it's a code error??
EDIT: After checking some revisions I realized it was changed and originally the line 444 from
multi_problem.py
was:While now is:
Which makes the bug because now the number of parameters is 6 and all loss functions expect 5. Hope it helps
Environment information
tensor2tensor 1.13.0
For bugs: reproduction and error logs
My class for MultiProblem is:
And I'm running a
transformer
withtransformer_tall_finetune_textclass