I need help

Stackoverflow source: tensorflow2.0 - Passing random value in tensorflow function as a parameter - Stack Overflow

I have code in my augmentation tf.data pipeline…

```
# BLURE
filter_size = tf.random.uniform(shape=[], minval=0, maxval=5)
image = tfa.image.mean_filter2d(image, filter_shape=filter_size)
```

But I’m constantly getting error…

```
TypeError: The `filter_shape` argument must be a tuple of 2 integers. Received: Tensor("filter_shape:0", shape=(), dtype=int32)
```

I tried getting static value from random tensorflow like this…

```
# BLURE
filter_size = tf.get_static_value(tf.random.uniform(shape=[], minval=0, maxval=5))
image = tfa.image.mean_filter2d(image, filter_shape=(filter_size, filter_size))
```

But I get error…

```
TypeError: The `filter_shape` argument must be a tuple of 2 integers. Received: None
```

And this errors makes me sad

I want to create augmentation pipeline for `tf.data`

btw…