diff --git a/src/TensorFlowNET.Core/NumPy/Implementation/RandomizedImpl.cs b/src/TensorFlowNET.Core/NumPy/Implementation/RandomizedImpl.cs index 244fc61b..bed327a3 100644 --- a/src/TensorFlowNET.Core/NumPy/Implementation/RandomizedImpl.cs +++ b/src/TensorFlowNET.Core/NumPy/Implementation/RandomizedImpl.cs @@ -23,7 +23,10 @@ namespace Tensorflow.NumPy public NDArray rand(params int[] shape) => throw new NotImplementedException(""); - public NDArray randint(long x) + public NDArray randint(int low, int? high = null, Shape size = null, TF_DataType dtype = TF_DataType.TF_INT32) + => throw new NotImplementedException(""); + + public NDArray normal(float loc = 0.0f, float scale = 1.0f, Shape size = null) => throw new NotImplementedException(""); } } diff --git a/src/TensorFlowNET.Core/NumPy/Numpy.Manipulation.cs b/src/TensorFlowNET.Core/NumPy/Numpy.Manipulation.cs index 2e970839..e75343db 100644 --- a/src/TensorFlowNET.Core/NumPy/Numpy.Manipulation.cs +++ b/src/TensorFlowNET.Core/NumPy/Numpy.Manipulation.cs @@ -8,10 +8,16 @@ namespace Tensorflow.NumPy { public partial class np { + [AutoNumPy] + public static NDArray expand_dims(NDArray a, Axis? axis = null) => throw new NotImplementedException(""); + [AutoNumPy] public static NDArray reshape(NDArray x1, Shape newshape) => x1.reshape(newshape); [AutoNumPy] public static NDArray squeeze(NDArray x1, Axis? axis = null) => new NDArray(array_ops.squeeze(x1, axis)); + + [AutoNumPy] + public static NDArray dstack(params NDArray[] tup) => throw new NotImplementedException(""); } } diff --git a/src/TensorFlowNET.Core/Numpy/Numpy.Creation.cs b/src/TensorFlowNET.Core/Numpy/Numpy.Creation.cs index 9ade2725..c15cd685 100644 --- a/src/TensorFlowNET.Core/Numpy/Numpy.Creation.cs +++ b/src/TensorFlowNET.Core/Numpy/Numpy.Creation.cs @@ -35,7 +35,11 @@ namespace Tensorflow.NumPy [AutoNumPy] public static NDArray full(Shape shape, T fill_value) - => new NDArray(tf.fill(tf.constant(shape), fill_value)); + where T : unmanaged => new NDArray(tf.fill(tf.constant(shape), fill_value)); + + [AutoNumPy] + public static NDArray full_like(NDArray x, T fill_value, TF_DataType? dtype = null, Shape shape = null) + where T : unmanaged => new NDArray(array_ops.fill(x.shape, constant_op.constant(fill_value))); [AutoNumPy] public static NDArray frombuffer(byte[] bytes, Shape shape, TF_DataType dtype) diff --git a/src/TensorFlowNET.Keras/Preprocessings/DatasetUtils.index_directory.cs b/src/TensorFlowNET.Keras/Preprocessings/DatasetUtils.index_directory.cs index cfcbc4bc..1eb4f431 100644 --- a/src/TensorFlowNET.Keras/Preprocessings/DatasetUtils.index_directory.cs +++ b/src/TensorFlowNET.Keras/Preprocessings/DatasetUtils.index_directory.cs @@ -49,7 +49,7 @@ namespace Tensorflow.Keras.Preprocessings if (shuffle) { if (!seed.HasValue) - seed = np.random.randint((long)1e6); + seed = np.random.randint((int)1e6); var random_index = np.arange(label_list.Count); tf.set_random_seed(seed.Value); np.random.shuffle(random_index);