-
Notifications
You must be signed in to change notification settings - Fork 628
Description
Instructions for updating:
Please use layer.__call__ method instead.
Traceback (most recent call last):
File "D:\PY3\maml-master\main.py", line 348, in
main()
File "D:\PY3\maml-master\main.py", line 289, in main
model.construct_model(input_tensors=input_tensors, prefix='metatrain_')
File "D:\PY3\maml-master\maml.py", line 122, in construct_model
unused = task_metalearn((self.inputa[0], self.inputb[0], self.labela[0], self.labelb[0]), False)
File "D:\PY3\maml-master\maml.py", line 87, in task_metalearn
task_outputa = self.forward(inputa, weights, reuse=reuse) # only reuse on the first iter
File "D:\PY3\maml-master\maml.py", line 180, in forward_fc
hidden = normalize(tf.matmul(inp, weights['w1']) + weights['b1'], activation=tf.nn.relu, reuse=reuse, scope='0')
File "D:\PY3\maml-master\utils.py", line 41, in normalize
return tf_layers.batch_norm(inp, activation_fn=activation, reuse=reuse, scope=scope)
File "D:\PY3\anaconda3\envs\py36\lib\site-packages\tensorflow_core\contrib\framework\python\ops\arg_scope.py", line 182, in func_with_args
return func(*args, **current_args)
File "D:\PY3\anaconda3\envs\py36\lib\site-packages\tensorflow_core\contrib\layers\python\layers\layers.py", line 650, in batch_norm
outputs = layer.apply(inputs, training=is_training)
File "D:\PY3\anaconda3\envs\py36\lib\site-packages\tensorflow_core\python\util\deprecation.py", line 324, in new_func
return func(*args, **kwargs)
File "D:\PY3\anaconda3\envs\py36\lib\site-packages\tensorflow_core\python\keras\engine\base_layer.py", line 1700, in apply
return self.call(inputs, *args, **kwargs)
File "D:\PY3\anaconda3\envs\py36\lib\site-packages\tensorflow_core\python\layers\base.py", line 548, in call
outputs = super(Layer, self).call(inputs, *args, **kwargs)
File "D:\PY3\anaconda3\envs\py36\lib\site-packages\tensorflow_core\python\keras\engine\base_layer.py", line 824, in call
self._maybe_build(inputs)
File "D:\PY3\anaconda3\envs\py36\lib\site-packages\tensorflow_core\python\keras\engine\base_layer.py", line 2146, in _maybe_build
self.build(input_shapes)
File "D:\PY3\anaconda3\envs\py36\lib\site-packages\tensorflow_core\python\keras\layers\normalization.py", line 275, in build
raise ValueError('Input has undefined rank:', input_shape)
ValueError: ('Input has undefined rank:', TensorShape(None))