| @@ -182,12 +182,7 @@ namespace Tensorflow | |||||
| => nn_impl.sigmoid_cross_entropy_with_logits(labels: labels, logits: logits, name: name); | => nn_impl.sigmoid_cross_entropy_with_logits(labels: labels, logits: logits, name: name); | ||||
| public Tensor softmax(Tensor logits, int axis = -1, string name = null) | public Tensor softmax(Tensor logits, int axis = -1, string name = null) | ||||
| { | |||||
| if (axis == -1) | |||||
| return gen_nn_ops.softmax(logits, name); | |||||
| else | |||||
| throw new NotImplementedException(""); | |||||
| } | |||||
| => gen_nn_ops.softmax(logits, name); | |||||
| /// <summary> | /// <summary> | ||||
| @@ -44,6 +44,9 @@ namespace Tensorflow | |||||
| public Optimizer AdamOptimizer(float learning_rate, TF_DataType dtype, string name = "Adam") | public Optimizer AdamOptimizer(float learning_rate, TF_DataType dtype, string name = "Adam") | ||||
| => new AdamOptimizer(learning_rate, name: name, dtype: dtype); | => new AdamOptimizer(learning_rate, name: name, dtype: dtype); | ||||
| public Optimizer AdamOptimizer(IVariableV1 learning_rate, string name = "Adam") | |||||
| => new AdamOptimizer(learning_rate.AsTensor(), name: name); | |||||
| public Optimizer AdamOptimizer(Tensor learning_rate, string name = "Adam") | public Optimizer AdamOptimizer(Tensor learning_rate, string name = "Adam") | ||||
| => new AdamOptimizer(learning_rate, name: name); | => new AdamOptimizer(learning_rate, name: name); | ||||
| @@ -207,7 +207,7 @@ namespace Tensorflow | |||||
| { | { | ||||
| apply_updates = state_ops.assign_add(global_step, | apply_updates = state_ops.assign_add(global_step, | ||||
| ops.convert_to_tensor(1, dtype: global_step.dtype), | ops.convert_to_tensor(1, dtype: global_step.dtype), | ||||
| name: name) as Operation; | |||||
| name: name); | |||||
| } | } | ||||
| }); | }); | ||||
| } | } | ||||
| @@ -73,7 +73,7 @@ namespace Tensorflow | |||||
| // handle_deleter | // handle_deleter | ||||
| } | } | ||||
| public ITensorOrOperation assign<T>(T value, bool use_locking = false, string name = null, bool read_value = true) | |||||
| public Tensor assign<T>(T value, bool use_locking = false, string name = null, bool read_value = true) | |||||
| { | { | ||||
| if(value.GetType() == typeof(Tensor)) | if(value.GetType() == typeof(Tensor)) | ||||
| { | { | ||||
| @@ -134,7 +134,7 @@ namespace Tensorflow | |||||
| return array_ops.identity(value); | return array_ops.identity(value); | ||||
| }); | }); | ||||
| public ITensorOrOperation assign_add<T>(T delta, bool use_locking = false, string name = null, bool read_value = true) | |||||
| public Tensor assign_add<T>(T delta, bool use_locking = false, string name = null, bool read_value = true) | |||||
| { | { | ||||
| var assign_add_op = gen_resource_variable_ops.assign_add_variable_op(Handle, | var assign_add_op = gen_resource_variable_ops.assign_add_variable_op(Handle, | ||||
| ops.convert_to_tensor(delta, dtype: dtype), name: name); | ops.convert_to_tensor(delta, dtype: dtype), name: name); | ||||
| @@ -47,8 +47,8 @@ namespace Tensorflow | |||||
| public Graph Graph { get; } | public Graph Graph { get; } | ||||
| public TF_DataType dtype { get; } | public TF_DataType dtype { get; } | ||||
| public TensorShape shape { get; } | public TensorShape shape { get; } | ||||
| ITensorOrOperation assign_add<T>(T delta, bool use_locking = false, string name = null, bool read_value = true); | |||||
| ITensorOrOperation assign<T>(T value, bool use_locking = false, string name = null, bool read_value = true); | |||||
| Tensor assign_add<T>(T delta, bool use_locking = false, string name = null, bool read_value = true); | |||||
| Tensor assign<T>(T value, bool use_locking = false, string name = null, bool read_value = true); | |||||
| Tensor AsTensor(); | Tensor AsTensor(); | ||||
| } | } | ||||
| } | } | ||||
| @@ -335,7 +335,7 @@ namespace Tensorflow | |||||
| /// A `Tensor` that will hold the new value of this variable after | /// A `Tensor` that will hold the new value of this variable after | ||||
| /// the assignment has completed. | /// the assignment has completed. | ||||
| /// </returns> | /// </returns> | ||||
| public ITensorOrOperation assign<T>(T value, bool use_locking = false, string name = null, bool read_value = true) | |||||
| public Tensor assign<T>(T value, bool use_locking = false, string name = null, bool read_value = true) | |||||
| { | { | ||||
| var assign = gen_state_ops.assign(_variable, value, use_locking: use_locking, name: name); | var assign = gen_state_ops.assign(_variable, value, use_locking: use_locking, name: name); | ||||
| if (read_value) | if (read_value) | ||||
| @@ -418,7 +418,7 @@ namespace Tensorflow | |||||
| // name: A name for the operation(optional). | // name: A name for the operation(optional). | ||||
| // Returns: | // Returns: | ||||
| // A mutable `Tensor`. Has the same type as `ref`. | // A mutable `Tensor`. Has the same type as `ref`. | ||||
| public ITensorOrOperation assign_add<T>(T value, bool use_locking = false, string name = null, bool read_value = true) | |||||
| public Tensor assign_add<T>(T value, bool use_locking = false, string name = null, bool read_value = true) | |||||
| { | { | ||||
| var variable = this; | var variable = this; | ||||
| var _op = tf.OpDefLib._apply_op_helper("AssignAdd", name: name, args: new { variable, value, use_locking }); | var _op = tf.OpDefLib._apply_op_helper("AssignAdd", name: name, args: new { variable, value, use_locking }); | ||||
| @@ -95,7 +95,7 @@ namespace Tensorflow | |||||
| // Returns: | // Returns: | ||||
| // Same as "ref". Returned as a convenience for operations that want | // Same as "ref". Returned as a convenience for operations that want | ||||
| // to use the new value after the variable has been updated. | // to use the new value after the variable has been updated. | ||||
| public static ITensorOrOperation assign_add<T>(IVariableV1 @ref, | |||||
| public static Tensor assign_add<T>(IVariableV1 @ref, | |||||
| T value, | T value, | ||||
| bool use_locking = false, | bool use_locking = false, | ||||
| string name = null) | string name = null) | ||||