Pycharm fails at transfer learning tutorial

Sorry if this is off topic!
Tryng to run the transfer learning tutorial
on Windows 10.
It works like a charm in the Anaconda command shell, but fails in Pycharm.
It crashes at the statement

Get a batch of training data

inputs, classes = next(iter(dataloaders[‘train’]))

The error message suggests a problem with forking and mentions freeze_support, but this seems unlikely.

Has anyone been able to run this tutorial in Pycharm?

All the best

More specifically, it’s iter(dataloaders[‘train’]) that fails.
The Dataloader object looks reasonable in the debugger.
I’ve tried adding
prior to the statement, to no effect.

Since the code works in the Anaconda CMD Prompt, it’s basically a Pycharm problem, right?

Apparently, the problem did have to do with forking, and the solution was to put the code (not just the iter part) in a
if name == ‘main’: