You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 3, 2024. It is now read-only.
Running the mnist.py demo, receive the following error
Traceback (most recent call last):
File "C:\Users\ma7555\Anaconda3\lib\site-packages\tensorflow\python\ops\array_ops.py", line 2953, in ones
tensor_shape.TensorShape(shape))
File "C:\Users\ma7555\Anaconda3\lib\site-packages\tensorflow\python\framework\tensor_shape.py", line 771, in __init__
self._dims = [as_dimension(d) for d in dims_iter]
File "C:\Users\ma7555\Anaconda3\lib\site-packages\tensorflow\python\framework\tensor_shape.py", line 771, in <listcomp>
self._dims = [as_dimension(d) for d in dims_iter]
File "C:\Users\ma7555\Anaconda3\lib\site-packages\tensorflow\python\framework\tensor_shape.py", line 716, in as_dimension
return Dimension(value)
File "C:\Users\ma7555\Anaconda3\lib\site-packages\tensorflow\python\framework\tensor_shape.py", line 200, in __init__
None)
File "<string>", line 3, in raise_from
TypeError: Dimension value must be integer or None or have an __index__ method, got <tf.Tensor 'strided_slice:0' shape=() dtype=int32>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\ma7555\Anaconda3\lib\site-packages\tensorflow\python\ops\gen_array_ops.py", line 6328, in pack
values, "axis", axis)
tensorflow.python.eager.core._FallbackException: This function does not handle the case of the path where all inputs are not already EagerTensors.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:/Users/ma7555/Documents/Kaggle/bengaliai-cv19/mnist.py", line 75, in <module>
drop_block_model = get_drop_block_model()
File "c:/Users/ma7555/Documents/Kaggle/bengaliai-cv19/mnist.py", line 56, in get_drop_block_model
model.add(DropBlock2D(input_shape=(28, 28, 1), block_size=7, keep_prob=0.8, name='Input-Dropout'))
File "C:\Users\ma7555\Anaconda3\lib\site-packages\keras\engine\sequential.py", line 166, in add
layer(x)
File "C:\Users\ma7555\Anaconda3\lib\site-packages\keras\backend\tensorflow_backend.py", line 75, in symbolic_fn_wrapper
return func(*args, **kwargs)
File "C:\Users\ma7555\Anaconda3\lib\site-packages\keras\engine\base_layer.py", line 489, in __call__
output = self.call(inputs, **kwargs)
File "C:\Users\ma7555\Anaconda3\lib\site-packages\keras_drop_block\drop_block.py", line 200, in call
return K.in_train_phase(dropped_inputs, inputs, training=training)
File "C:\Users\ma7555\Anaconda3\lib\site-packages\keras\backend\tensorflow_backend.py", line 75, in symbolic_fn_wrapper
return func(*args, **kwargs)
File "C:\Users\ma7555\Anaconda3\lib\site-packages\keras\backend\tensorflow_backend.py", line 3214, in in_train_phase
x = switch(training, x, alt)
File "C:\Users\ma7555\Anaconda3\lib\site-packages\keras\backend\tensorflow_backend.py", line 75, in symbolic_fn_wrapper
return func(*args, **kwargs)
File "C:\Users\ma7555\Anaconda3\lib\site-packages\keras\backend\tensorflow_backend.py", line 3147, in switch
else_expression_fn)
File "C:\Users\ma7555\Anaconda3\lib\site-packages\tensorflow\python\ops\control_flow_ops.py", line 1392, in cond_for_tf_v2
return cond(pred, true_fn=true_fn, false_fn=false_fn, strict=True, name=name)
File "C:\Users\ma7555\Anaconda3\lib\site-packages\tensorflow\python\util\deprecation.py", line 507, in new_func
return func(*args, **kwargs)
File "C:\Users\ma7555\Anaconda3\lib\site-packages\tensorflow\python\ops\control_flow_ops.py", line 1177, in cond
return cond_v2.cond_v2(pred, true_fn, false_fn, name)
File "C:\Users\ma7555\Anaconda3\lib\site-packages\tensorflow\python\ops\cond_v2.py", line 83, in cond_v2
op_return_value=pred)
File "C:\Users\ma7555\Anaconda3\lib\site-packages\tensorflow\python\framework\func_graph.py", line 981, in func_graph_from_py_func
func_outputs = python_func(*func_args, **func_kwargs)
File "C:\Users\ma7555\Anaconda3\lib\site-packages\keras_drop_block\drop_block.py", line 193, in dropped_inputs
mask = self._compute_drop_mask(shape)
File "C:\Users\ma7555\Anaconda3\lib\site-packages\keras_drop_block\drop_block.py", line 174, in _compute_drop_mask
mask *= self._compute_valid_seed_region(height, width)
File "C:\Users\ma7555\Anaconda3\lib\site-packages\keras_drop_block\drop_block.py", line 166, in _compute_valid_seed_region
K.ones((height, width)),
File "C:\Users\ma7555\Anaconda3\lib\site-packages\keras\backend\tensorflow_backend.py", line 996, in ones
v = tf.ones(shape=shape, dtype=dtype, name=name)
File "C:\Users\ma7555\Anaconda3\lib\site-packages\tensorflow\python\ops\array_ops.py", line 2956, in ones
shape = ops.convert_to_tensor(shape, dtype=dtypes.int32)
File "C:\Users\ma7555\Anaconda3\lib\site-packages\tensorflow\python\framework\ops.py", line 1341, in convert_to_tensor
ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref)
File "C:\Users\ma7555\Anaconda3\lib\site-packages\tensorflow\python\ops\array_ops.py", line 1449, in _autopacking_conversion_function
return _autopacking_helper(v, dtype, name or "packed")
File "C:\Users\ma7555\Anaconda3\lib\site-packages\tensorflow\python\ops\array_ops.py", line 1355, in _autopacking_helper
return gen_array_ops.pack(list_or_tuple, name=name)
File "C:\Users\ma7555\Anaconda3\lib\site-packages\tensorflow\python\ops\gen_array_ops.py", line 6333, in pack
values, axis=axis, name=name, ctx=_ctx)
File "C:\Users\ma7555\Anaconda3\lib\site-packages\tensorflow\python\ops\gen_array_ops.py", line 6375, in pack_eager_fallback
ctx=ctx, name=name)
File "C:\Users\ma7555\Anaconda3\lib\site-packages\tensorflow\python\eager\execute.py", line 75, in quick_execute
raise e
File "C:\Users\ma7555\Anaconda3\lib\site-packages\tensorflow\python\eager\execute.py", line 60, in quick_execute
inputs, attrs, num_outputs)
TypeError: An op outside of the function building code is being passed
a "Graph" tensor. It is possible to have Graph tensors
leak out of the function building context by including a
tf.init_scope in your function building code.
For example, the following function will fail:
@tf.function
def has_init_scope():
my_constant = tf.constant(1.)
with tf.init_scope():
added = my_constant * 2
The graph tensor has name: strided_slice:0
The text was updated successfully, but these errors were encountered:
Running the mnist.py demo, receive the following error
The text was updated successfully, but these errors were encountered: