alignn icon indicating copy to clipboard operation
alignn copied to clipboard

Singleton dimension needs to be squashed

Open Andrew-S-Rosen opened this issue 7 months ago • 0 comments

I am running the development version of ALIGNN and am getting a warning related to a singleton dimension not being squashed:

C:\Users\asrosen\AppData\Local\miniconda3\envs\alignn\Lib\site-packages\torch\nn\modules\loss.py:101: UserWarning: Using a target size (torch.Size([20])) that is different to the input size (torch.Size([20, 1])). This will likely lead to incorrect results due to broadcasting. Please ensure they have the same size.
  return F.l1_loss(input, target, reduction=self.reduction)

To reproduce the error, run

python -m alignn.train_alignn --root_dir model_data --config config.json --output model_output --atomwise_key bader_charge

where config.json is in the current working directory (attached) and model_data is a folder in the current directory (also attached).

model_data.zip config.json

Andrew-S-Rosen avatar Jun 04 '25 21:06 Andrew-S-Rosen