Thanks, Ricardo. This helped get the model to compile. When I sample, however, I get this surprising error message:
<<!! BUG IN FGRAPH.REPLACE OR A LISTENER !!>> <class 'TypeError'> The type of the replacement (Matrix(float64, shape=(1, 1))) must be compatible with the type of the original Variable (Matrix(float64, shape=(1, 629))). local_add_neg_to_sub
ERROR (pytensor.graph.rewriting.basic): Rewrite failure due to: local_add_neg_to_sub
ERROR (pytensor.graph.rewriting.basic): node: Add([[-1.09861 ... 09861229]], ExpandDims{axes=[0, 1]}.0)
ERROR (pytensor.graph.rewriting.basic): TRACEBACK:
ERROR (pytensor.graph.rewriting.basic): Traceback (most recent call last):
File "c:\Users\mason\AppData\Local\Continuum\anaconda3\envs\stat-rethink2-pymc\Lib\site-packages\pytensor\graph\rewriting\basic.py", line 1968, in process_node
fgraph.replace_all_validate_remove( # type: ignore
File "c:\Users\mason\AppData\Local\Continuum\anaconda3\envs\stat-rethink2-pymc\Lib\site-packages\pytensor\graph\features.py", line 626, in replace_all_validate_remove
chk = fgraph.replace_all_validate(replacements, reason=reason, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "c:\Users\mason\AppData\Local\Continuum\anaconda3\envs\stat-rethink2-pymc\Lib\site-packages\pytensor\graph\features.py", line 571, in replace_all_validate
fgraph.replace(r, new_r, reason=reason, verbose=False, **kwargs)
File "c:\Users\mason\AppData\Local\Continuum\anaconda3\envs\stat-rethink2-pymc\Lib\site-packages\pytensor\graph\fg.py", line 508, in replace
self.change_node_input(
File "c:\Users\mason\AppData\Local\Continuum\anaconda3\envs\stat-rethink2-pymc\Lib\site-packages\pytensor\graph\fg.py", line 428, in change_node_input
raise TypeError(
TypeError: The type of the replacement (Matrix(float64, shape=(1, 1))) must be compatible with the type of the original Variable (Matrix(float64, shape=(1, 629))).
However, the model appears to sample just fine, and I am able to replicate the summary outputs from the previous model version. Is this perhaps an error in model specification or did this uncover a true bug?