Hey,
I am unable to carry out a forward pass on my network, it seems to throw an error at the BatchNorm layer, even with the model in eval() mode. I am unable to spot my mistake, I hope someone can help me.
I have attached the relevant code snippets below :-
class Actor(nn.Module):
def init(self, env):
super(Actor, self).init()
self.stateDim = len(obs2state(env.reset().observation)) #evaluates to 37
self.actionDim = env.action_spec().shape[0]
self.norm0 = nn.BatchNorm1d(self.stateDim)

#main function:
actor = Actor(env).cuda()
actor.eval()
action = actor(Variable(curState, volatile=True).cuda())
Error:
raise ValueError(‘Expected more than 1 value per channel when training, got input size {}’.format(size))
.
.
running_mean should contain 140389837773688 elements not 37