Skip to content

Commit

Permalink
update: replace tf.convert_to_tensor with ops.core.convert_to_tensor
Browse files Browse the repository at this point in the history
  • Loading branch information
soumik12345 committed Jul 15, 2023
1 parent efb57ff commit 77aa7a3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions keras_core/backend/common/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@
from keras_core.backend.common.variables import standardize_dtype
from keras_core.backend.common.variables import standardize_shape
from keras_core.random import random
convert
2 changes: 1 addition & 1 deletion keras_core/layers/preprocessing/random_crop.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def __init__(

def call(self, inputs, training=True):
if not isinstance(inputs, (tf.Tensor, np.ndarray, list, tuple)):
inputs = tf.convert_to_tensor(backend.convert_to_numpy(inputs))
inputs = ops.core.convert_to_tensor(backend.convert_to_numpy(inputs))

input_shape = ops.shape(inputs)
h_diff = input_shape[self.height_axis] - self.height
Expand Down

0 comments on commit 77aa7a3

Please sign in to comment.