This comes after solver.train() is called in the train.py
Traceback (most recent call last):
File "/opt/conda/lib/python3.7/site-packages/tensorflow_core/python/framework/ops.py", line 1607, in _create_c_op
c_op = c_api.TF_FinishOperation(op_desc)
tensorflow.python.framework.errors_impl.InvalidArgumentError: Shapes must be equal rank, but are 2 and 0
From merging shape 0 with other shapes. for 'encoder/enc_pe/Tile/multiples_1' (op: 'Pack') with input shapes: [196,512], [].
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/conda/lib/python3.7/site-packages/tensorflow_core/python/framework/op_def_library.py", line 528, in _apply_op_helper
preferred_dtype=default_dtype)
File "/opt/conda/lib/python3.7/site-packages/tensorflow_core/python/framework/ops.py", line 1297, in internal_convert_to_tensor
ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref)
File "/opt/conda/lib/python3.7/site-packages/tensorflow_core/python/ops/array_ops.py", line 1267, in _autopacking_conversion_function
return _autopacking_helper(v, dtype, name or "packed")
File "/opt/conda/lib/python3.7/site-packages/tensorflow_core/python/ops/array_ops.py", line 1203, in _autopacking_helper
return gen_array_ops.pack(elems_as_tensors, name=scope)
File "/opt/conda/lib/python3.7/site-packages/tensorflow_core/python/ops/gen_array_ops.py", line 6303, in pack
"Pack", values=values, axis=axis, name=name)
File "/opt/conda/lib/python3.7/site-packages/tensorflow_core/python/framework/op_def_library.py", line 794, in _apply_op_helper
op_def=op_def)
File "/opt/conda/lib/python3.7/site-packages/tensorflow_core/python/util/deprecation.py", line 507, in new_func
return func(*args, **kwargs)
File "/opt/conda/lib/python3.7/site-packages/tensorflow_core/python/framework/ops.py", line 3357, in create_op
attrs, op_def, compute_device)
File "/opt/conda/lib/python3.7/site-packages/tensorflow_core/python/framework/ops.py", line 3426, in _create_op_internal
op_def=op_def)
File "/opt/conda/lib/python3.7/site-packages/tensorflow_core/python/framework/ops.py", line 1770, in init
control_input_ops)
File "/opt/conda/lib/python3.7/site-packages/tensorflow_core/python/framework/ops.py", line 1610, in _create_c_op
raise ValueError(str(e))
ValueError: Shapes must be equal rank, but are 2 and 0
From merging shape 0 with other shapes. for 'encoder/enc_pe/Tile/multiples_1' (op: 'Pack') with input shapes: [196,512], [].
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/conda/lib/python3.7/site-packages/tensorflow_core/python/framework/ops.py", line 1607, in _create_c_op
c_op = c_api.TF_FinishOperation(op_desc)
tensorflow.python.framework.errors_impl.InvalidArgumentError: Shapes must be equal rank, but are 2 and 0
From merging shape 0 with other shapes. for 'encoder/enc_pe/Tile/packed' (op: 'Pack') with input shapes: [196,512], [].
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/conda/lib/python3.7/site-packages/tensorflow_core/python/framework/op_def_library.py", line 542, in _apply_op_helper
values, as_ref=input_arg.is_ref).dtype.name
File "/opt/conda/lib/python3.7/site-packages/tensorflow_core/python/framework/ops.py", line 1297, in internal_convert_to_tensor
ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref)
File "/opt/conda/lib/python3.7/site-packages/tensorflow_core/python/ops/array_ops.py", line 1267, in _autopacking_conversion_function
return _autopacking_helper(v, dtype, name or "packed")
File "/opt/conda/lib/python3.7/site-packages/tensorflow_core/python/ops/array_ops.py", line 1203, in _autopacking_helper
return gen_array_ops.pack(elems_as_tensors, name=scope)
File "/opt/conda/lib/python3.7/site-packages/tensorflow_core/python/ops/gen_array_ops.py", line 6303, in pack
"Pack", values=values, axis=axis, name=name)
File "/opt/conda/lib/python3.7/site-packages/tensorflow_core/python/framework/op_def_library.py", line 794, in _apply_op_helper
op_def=op_def)
File "/opt/conda/lib/python3.7/site-packages/tensorflow_core/python/util/deprecation.py", line 507, in new_func
return func(*args, **kwargs)
File "/opt/conda/lib/python3.7/site-packages/tensorflow_core/python/framework/ops.py", line 3357, in create_op
attrs, op_def, compute_device)
File "/opt/conda/lib/python3.7/site-packages/tensorflow_core/python/framework/ops.py", line 3426, in _create_op_internal
op_def=op_def)
File "/opt/conda/lib/python3.7/site-packages/tensorflow_core/python/framework/ops.py", line 1770, in init
control_input_ops)
File "/opt/conda/lib/python3.7/site-packages/tensorflow_core/python/framework/ops.py", line 1610, in _create_c_op
raise ValueError(str(e))
ValueError: Shapes must be equal rank, but are 2 and 0
From merging shape 0 with other shapes. for 'encoder/enc_pe/Tile/packed' (op: 'Pack') with input shapes: [196,512], [].
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "train.py", line 28, in
main()
File "train.py", line 25, in main
solver.train()
File "/home/tanhoodz/Major Project/solver.py", line 82, in train
loss = self.model.build_model()
File "/home/tanhoodz/Major Project/model.py", line 74, in build_model
scope="enc_pe")
File "/home/tanhoodz/Major Project/transformer_modules.py", line 135, in positional_encoding
position_ind = tf.tile(tf.expand_dims(tf.range(T), 0), [N, 1])
File "/opt/conda/lib/python3.7/site-packages/tensorflow_core/python/ops/gen_array_ops.py", line 11309, in tile
"Tile", input=input, multiples=multiples, name=name)
File "/opt/conda/lib/python3.7/site-packages/tensorflow_core/python/framework/op_def_library.py", line 546, in _apply_op_helper
(input_name, err))
ValueError: Tried to convert 'multiples' to a tensor and failed. Error: Shapes must be equal rank, but are 2 and 0
From merging shape 0 with other shapes. for 'encoder/enc_pe/Tile/packed' (op: 'Pack') with input shapes: [196,512], [].