text: Title: Error "TypeError: 'NoneType' object is not iterable" triggered by modellib.MaskRCNN in demo.ipynb
  Body: Hi, 
  
  I have an error when I try to run the demo.ipynb file. I guess it's due to modellib.MasrRCNN function (see error below).
   My first guess is that it's due to tensorflow version that i'm using which is 2.2.0. But when I changed that to an older version 1.3.0, there's an incompatibility between keras and tensorflow as keras requires at least tensorflow version 2.2.
  Can anyone help please?
  Thanks,
  ---------------------------------------------------------------------------
  TypeError                                 Traceback (most recent call last)
  <ipython-input-4-de1010a949a4> in <module>
        1 # Create model object in inference mode.
  ----> 2 model = modellib.MaskRCNN(mode="inference", model_dir=MODEL_DIR, config=config)
        3 # Load weights trained on MS-COCO
        4 model.load_weights(COCO_MODEL_PATH, by_name=True)
  
  ~\Documents\1_USMBA\sw\Mask_RCNN\mrcnn\model.py in __init__(self, mode, config, model_dir)
     1835         self.model_dir = model_dir
     1836         self.set_log_dir()
  -> 1837         self.keras_model = self.build(mode=mode, config=config)
     1838 
     1839     def build(self, mode, config):
  
  ~\Documents\1_USMBA\sw\Mask_RCNN\mrcnn\model.py in build(self, mode, config)
     1899         else:
     1900             _, C2, C3, C4, C5 = resnet_graph(input_image, config.BACKBONE,
  -> 1901                                              stage5=True, train_bn=config.TRAIN_BN)
     1902         # Top-down Layers
     1903         # TODO: add assert to varify feature map sizes match what's in config
  
  ~\Documents\1_USMBA\sw\Mask_RCNN\mrcnn\model.py in resnet_graph(input_image, architecture, stage5, train_bn)
      178     # Stage 1
      179     x = KL.ZeroPadding2D((3, 3))(input_image)
  --> 180     x = KL.Conv2D(64, (7, 7), strides=(2, 2), name='conv1', use_bias=True)(x)
      181     x = BatchNorm(name='bn_conv1')(x, training=train_bn)
      182     x = KL.Activation('relu')(x)
  
  c:\users\youssef\anaconda3\envs\maskrcnn\lib\site-packages\tensorflow\python\keras\engine\base_layer.py in __call__(self, *args, **kwargs)
      895           # Build layer if applicable (if the `build` method has been
      896           # overridden).
  --> 897           self._maybe_build(inputs)
      898           cast_inputs = self._maybe_cast_inputs(inputs)
      899 
  
  c:\users\youssef\anaconda3\envs\maskrcnn\lib\site-packages\tensorflow\python\keras\engine\base_layer.py in _maybe_build(self, inputs)
     2414         # operations.
     2415         with tf_utils.maybe_init_scope(self):
  -> 2416           self.build(input_shapes)  # pylint:disable=not-callable
     2417       # We must set also ensure that the layer is marked as built, and the build
     2418       # shape is stored since user defined build functions may not be calling
  
  c:\users\youssef\anaconda3\envs\maskrcnn\lib\site-packages\tensorflow\python\keras\layers\convolutional.py in build(self, input_shape)
      161         constraint=self.kernel_constraint,
      162         trainable=True,
  --> 163         dtype=self.dtype)
      164     if self.use_bias:
      165       self.bias = self.add_weight(
  
  c:\users\youssef\anaconda3\envs\maskrcnn\lib\site-packages\tensorflow\python\keras\engine\base_layer.py in add_weight(self, name, shape, dtype, initializer, regularizer, trainable, constraint, partitioner, use_resource, synchronization, aggregation, **kwargs)
      575         synchronization=synchronization,
      576         aggregation=aggregation,
  --> 577         caching_device=caching_device)
      578     if regularizer is not None:
      579       # TODO(fchollet): in the future, this should be handled at the
  
  c:\users\youssef\anaconda3\envs\maskrcnn\lib\site-packages\tensorflow\python\training\tracking\base.py in _add_variable_with_custom_getter(self, name, shape, dtype, initializer, getter, overwrite, **kwargs_for_getter)
      741         dtype=dtype,
      742         initializer=initializer,
  --> 743         **kwargs_for_getter)
      744 
      745     # If we set an initializer and the variable processed it, tracking will not
  
  c:\users\youssef\anaconda3\envs\maskrcnn\lib\site-packages\tensorflow\python\keras\engine\base_layer_utils.py in make_variable(name, shape, dtype, initializer, trainable, caching_device, validate_shape, constraint, use_resource, collections, synchronization, aggregation, partitioner)
      139       synchronization=synchronization,
      140       aggregation=aggregation,
  --> 141       shape=variable_shape if variable_shape else None)
      142 
      143 
  
  c:\users\youssef\anaconda3\envs\maskrcnn\lib\site-packages\tensorflow\python\ops\variables.py in __call__(cls, *args, **kwargs)
      257   def __call__(cls, *args, **kwargs):
      258     if cls is VariableV1:
  --> 259       return cls._variable_v1_call(*args, **kwargs)
      260     elif cls is Variable:
      261       return cls._variable_v2_call(*args, **kwargs)
  
  c:\users\youssef\anaconda3\envs\maskrcnn\lib\site-packages\tensorflow\python\ops\variables.py in _variable_v1_call(cls, initial_value, trainable, collections, validate_shape, caching_device, name, variable_def, dtype, expected_shape, import_scope, constraint, use_resource, synchronization, aggregation, shape)
      218         synchronization=synchronization,
      219         aggregation=aggregation,
  --> 220         shape=shape)
      221 
      222   def _variable_v2_call(cls,
  
  c:\users\youssef\anaconda3\envs\maskrcnn\lib\site-packages\tensorflow\python\ops\variables.py in <lambda>(**kwargs)
      196                         shape=None):
      197     """Call on Variable class. Useful to force the signature."""
  --> 198     previous_getter = lambda **kwargs: default_variable_creator(None, **kwargs)
      199     for _, getter in ops.get_default_graph()._variable_creator_stack:  # pylint: disable=protected-access
      200       previous_getter = _make_getter(getter, previous_getter)
  
  c:\users\youssef\anaconda3\envs\maskrcnn\lib\site-packages\tensorflow\python\ops\variable_scope.py in default_variable_creator(next_creator, **kwargs)
     2596         synchronization=synchronization,
     2597         aggregation=aggregation,
  -> 2598         shape=shape)
     2599   else:
     2600     return variables.RefVariable(
  
  c:\users\youssef\anaconda3\envs\maskrcnn\lib\site-packages\tensorflow\python\ops\variables.py in __call__(cls, *args, **kwargs)
      261       return cls._variable_v2_call(*args, **kwargs)
      262     else:
  --> 263       return super(VariableMetaclass, cls).__call__(*args, **kwargs)
      264 
      265 
  
  c:\users\youssef\anaconda3\envs\maskrcnn\lib\site-packages\tensorflow\python\ops\resource_variable_ops.py in __init__(self, initial_value, trainable, collections, validate_shape, caching_device, name, dtype, variable_def, import_scope, constraint, distribute_strategy, synchronization, aggregation, shape)
     1432           aggregation=aggregation,
     1433           shape=shape,
  -> 1434           distribute_strategy=distribute_strategy)
     1435 
     1436   def _init_from_args(self,
  
  c:\users\youssef\anaconda3\envs\maskrcnn\lib\site-packages\tensorflow\python\ops\resource_variable_ops.py in _init_from_args(self, initial_value, trainable, collections, caching_device, name, dtype, constraint, synchronization, aggregation, distribute_strategy, shape)
     1565           with ops.name_scope("Initializer"), device_context_manager(None):
     1566             initial_value = ops.convert_to_tensor(
  -> 1567                 initial_value() if init_from_fn else initial_value,
     1568                 name="initial_value", dtype=dtype)
     1569           if shape is not None:
  
  c:\users\youssef\anaconda3\envs\maskrcnn\lib\site-packages\tensorflow\python\keras\engine\base_layer_utils.py in <lambda>()
      119         (type(init_ops.Initializer), type(init_ops_v2.Initializer))):
      120       initializer = initializer()
  --> 121     init_val = lambda: initializer(shape, dtype=dtype)
      122     variable_dtype = dtype.base_dtype
      123   if use_resource is None:
  
  c:\users\youssef\anaconda3\envs\maskrcnn\lib\site-packages\tensorflow\python\ops\init_ops_v2.py in __call__(self, shape, dtype)
      556     else:
      557       limit = math.sqrt(3.0 * scale)
  --> 558       return self._random_generator.random_uniform(shape, -limit, limit, dtype)
      559 
      560   def get_config(self):
  
  c:\users\youssef\anaconda3\envs\maskrcnn\lib\site-packages\tensorflow\python\ops\init_ops_v2.py in random_uniform(self, shape, minval, maxval, dtype)
     1066       op = random_ops.random_uniform
     1067     return op(
  -> 1068         shape=shape, minval=minval, maxval=maxval, dtype=dtype, seed=self.seed)
     1069 
     1070   def truncated_normal(self, shape, mean, stddev, dtype):
  
  c:\users\youssef\anaconda3\envs\maskrcnn\lib\site-packages\tensorflow\python\ops\random_ops.py in random_uniform(shape, minval, maxval, dtype, seed, name)
      280     maxval = 1
      281   with ops.name_scope(name, "random_uniform", [shape, minval, maxval]) as name:
  --> 282     shape = tensor_util.shape_tensor(shape)
      283     # In case of [0,1) floating results, minval and maxval is unused. We do an
      284     # `is` comparison here since this is cheaper than isinstance or  __eq__.
  
  c:\users\youssef\anaconda3\envs\maskrcnn\lib\site-packages\tensorflow\python\framework\tensor_util.py in shape_tensor(shape)
     1013       # not convertible to Tensors because of mixed content.
     1014       shape = tuple(map(tensor_shape.dimension_value, shape))
  -> 1015   return ops.convert_to_tensor(shape, dtype=dtype, name="shape")
     1016 
     1017 
  
  c:\users\youssef\anaconda3\envs\maskrcnn\lib\site-packages\tensorflow\python\framework\ops.py in convert_to_tensor(value, dtype, name, as_ref, preferred_dtype, dtype_hint, ctx, accepted_result_types)
     1339 
     1340     if ret is None:
  -> 1341       ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref)
     1342 
     1343     if ret is NotImplemented:
  
  c:\users\youssef\anaconda3\envs\maskrcnn\lib\site-packages\tensorflow\python\framework\constant_op.py in _constant_tensor_conversion_function(v, dtype, name, as_ref)
      319                                          as_ref=False):
      320   _ = as_ref
  --> 321   return constant(v, dtype=dtype, name=name)
      322 
      323 
  
  c:\users\youssef\anaconda3\envs\maskrcnn\lib\site-packages\tensorflow\python\framework\constant_op.py in constant(value, dtype, shape, name)
      260   """
      261   return _constant_impl(value, dtype, shape, name, verify_shape=False,
  --> 262                         allow_broadcast=True)
      263 
      264 
  
  c:\users\youssef\anaconda3\envs\maskrcnn\lib\site-packages\tensorflow\python\framework\constant_op.py in _constant_impl(value, dtype, shape, name, verify_shape, allow_broadcast)
      268   ctx = context.context()
      269   if ctx.executing_eagerly():
  --> 270     t = convert_to_eager_tensor(value, ctx, dtype)
      271     if shape is None:
      272       return t
  
  c:\users\youssef\anaconda3\envs\maskrcnn\lib\site-packages\tensorflow\python\framework\constant_op.py in convert_to_eager_tensor(value, ctx, dtype)
       93     except AttributeError:
       94       dtype = dtypes.as_dtype(dtype).as_datatype_enum
  ---> 95   ctx.ensure_initialized()
       96   return ops.EagerTensor(value, ctx.device_name, dtype)
       97 
  
  c:\users\youssef\anaconda3\envs\maskrcnn\lib\site-packages\tensorflow\python\eager\context.py in ensure_initialized(self)
      500       opts = pywrap_tfe.TFE_NewContextOptions()
      501       try:
  --> 502         config_str = self.config.SerializeToString()
      503         pywrap_tfe.TFE_ContextOptionsSetConfig(opts, config_str)
      504         if self._device_policy is not None:
  
  c:\users\youssef\anaconda3\envs\maskrcnn\lib\site-packages\tensorflow\python\eager\context.py in config(self)
      878     """Return the ConfigProto with all runtime deltas applied."""
      879     # Ensure physical devices have been discovered and config has been imported
  --> 880     self._initialize_physical_devices()
      881 
      882     config = config_pb2.ConfigProto()
  
  c:\users\youssef\anaconda3\envs\maskrcnn\lib\site-packages\tensorflow\python\eager\context.py in _initialize_physical_devices(self)
     1167       self._physical_devices = [
     1168           PhysicalDevice(name=d.decode(),
  -> 1169                          device_type=d.decode().split(":")[1]) for d in devs]
     1170       # Construct the visible device list from all physical devices but ignore
     1171       # XLA devices
  
  TypeError: 'NoneType' object is not iterable
  