Sorry to bother you again with dummy questions. And thank you very much for creating this great project and thorough answers you have given.
I tried to do the cyclic operation in the conv2d function but run into an error later. Not sure whether I did something wrong here or there is other places I need to modify as well.
Here is the PR
https://github.com/gcao/KataGo/pull/2/filesThe error I got
Code:
Traceback (most recent call last):
File "/usr/local/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: Dimensions must be equal, but are 23 and 19 for 'swa_model/mul_3' (op: 'Mul') with input shapes: [?,23,23,96], [?,19,19,1].
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/Users/gcao/.vscode-insiders/extensions/ms-python.python-2020.4.74986/pythonFiles/lib/python/debugpy/wheels/debugpy/__main__.py", line 45, in <module>
cli.main()
File "/Users/gcao/.vscode-insiders/extensions/ms-python.python-2020.4.74986/pythonFiles/lib/python/debugpy/wheels/debugpy/../debugpy/server/cli.py", line 430, in main
run()
File "/Users/gcao/.vscode-insiders/extensions/ms-python.python-2020.4.74986/pythonFiles/lib/python/debugpy/wheels/debugpy/../debugpy/server/cli.py", line 267, in run_file
runpy.run_path(options.target, run_name=compat.force_str("__main__"))
File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py", line 263, in run_path
pkg_name=pkg_name, script_name=fname)
File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py", line 96, in _run_module_code
mod_name, mod_spec, pkg_name, script_name)
File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/Users/gcao/daoqi/KataGo/python/train.py", line 133, in <module>
swa_model = Model(model_config,pos_len,placeholders={})
File "/Users/gcao/daoqi/KataGo/python/model.py", line 116, in __init__
self.build_model(config,placeholders)
File "/Users/gcao/daoqi/KataGo/python/model.py", line 1002, in build_model
File "/Users/gcao/daoqi/KataGo/python/model.py", line 725, in res_conv_block
scale_initial_weights=1.0, emphasize_center_weight=None, emphasize_center_lr=None, reg=True
File "/Users/gcao/daoqi/KataGo/python/model.py", line 517, in batchnorm_and_mask
return (tensor + beta) * mask
File "/usr/local/lib/python3.7/site-packages/tensorflow_core/python/ops/math_ops.py", line 899, in binary_op_wrapper
return func(x, y, name=name)
File "/usr/local/lib/python3.7/site-packages/tensorflow_core/python/ops/math_ops.py", line 1206, in _mul_dispatch
return gen_math_ops.mul(x, y, name=name)
File "/usr/local/lib/python3.7/site-packages/tensorflow_core/python/ops/gen_math_ops.py", line 6701, in mul
"Mul", x=x, y=y, name=name)
File "/usr/local/lib/python3.7/site-packages/tensorflow_core/python/framework/op_def_library.py", line 794, in _apply_op_helper
op_def=op_def)
File "/usr/local/lib/python3.7/site-packages/tensorflow_core/python/util/deprecation.py", line 507, in new_func
return func(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/tensorflow_core/python/framework/ops.py", line 3357, in create_op
attrs, op_def, compute_device)
File "/usr/local/lib/python3.7/site-packages/tensorflow_core/python/framework/ops.py", line 3426, in _create_op_internal
op_def=op_def)
File "/usr/local/lib/python3.7/site-packages/tensorflow_core/python/framework/ops.py", line 1770, in __init__
control_input_ops)
File "/usr/local/lib/python3.7/site-packages/tensorflow_core/python/framework/ops.py", line 1610, in _create_c_op
raise ValueError(str(e))
ValueError: Dimensions must be equal, but are 23 and 19 for 'swa_model/mul_3' (op: 'Mul') with input shapes: [?,23,23,96], [?,19,19,1].