Fixed bug in gdumb when pattern has no batch size
@@ -183,6 +183,8 @@ class GDumbPlugin(StrategyPlugin):
# for each pattern, add it to the memory or not
for i, (pattern, target_value) in enumerate(strategy.current_data):
target = torch.tensor(target_value)
+ if len(pattern.size()) == 1:
+ pattern = pattern.unsqueeze(0)
if self.counter == {}:
# any positive (>0) number is ok
