New Features:
cg_rowmeans and cg_colmeans.Bug Fixes:
New Features:
cg_length, cg_dim, cg_nrow, and cg_ncol.cg_graph_get to retrieve a node by name from a graph.cg_subset1 or cg_subset2, or the corresponding overloaded S3 methods [ and [[ respectively, on a cg_node object.cg_graph has a new argument eager which can be used to enable or disable eager evaluation. Eager evaluation can also be enabled or disabled on an existing graph by changing data member eager of a cg_graph object.cg_graph_forward and cg_graph_backward now allow argument target to be the name of the target node, in which case a linear search is performed to retrieve the node by name from the graph prior to a forward or backward pass. Please note that this search can be expensive for large graphs.Comments:
cg_graph_run and cg_graph_gradients have been removed.nodes of a cgraph object is no longer named for performance reasons. Use function cg_graph_get to retrieve a node.cg_operator has significantly improved. Graphs can now be build considerbly faster.Bug Fixes:
cg_graph_backward which sometimes caused a computational graph to be traversed in an incorrect order and compute incorrect gradients.New Features:
cg_square.cg_graph_forward and cg_graph_backward to perform a forward pass and backward pass respectively. These functions are similar to function cg_graph_run and cg_graph_gradients but do not use environments to store the values and derivatives of nodes. Instead, the value and derivative of a node are stored ‘locally’ at each node and can be retrieved by data member value and grad respectively.Comments:
cg_graph_run and cg_graph_gradients are deprecated and will be removed in the next major release. Use function cg_graph_forward and cg_graph_backward to perform a forward pass and backward pass instead.Bug Fixes:
Bug Fixes:
rchk.New Features:
index of function cg_graph_gradients can now also be NULL, in which case the nodes in a graph are differented element-wise. This is now also the default behavior.Comments:
v followed by the node id.type of a cg_node object.Bug Fixes:
cg_graph_run and cg_graph_gradients.bsum now prints a correct error message when argument block_size is not a numerical scalar.Bug Fixes:
cgraph on R versions before 3.5.cg_session_set_graph no longer prints NULL to the console when the active graph is changed.cg_sigmoid now works correctly when argument x is a logical or integer vector or array.Comments:
cg_reshape, !, ==, !=, <, >, <=, and >= are removed.cgraph is removed. Use function cg_graph to create a new graph. The active graph can now be retrieved and changed by function cg_session_graph and cg_session_set_graph respectively.const, input, parm, and opr have been renamed to cg_constant, cg_input, cg_parameter, and cg_operator respectively.val and set are removed. The value of a constant or parameter can now be retrieved or changed by data member value of a cg_node object.run and gradients have been renamed to cg_graph_run and cg_graph_gradients respectively.New Features:
cg_function object which can be linked to an operator. This significantly reduces the size of a cg_graph object.Bug Fixes:
cg_node environment rather than its value when calling cg_graph_run and cg_graph_gradients.cg_graph_run and cg_graph_gradients on a cg_graph object which contains nodes with an invalid id.Bug Fixes:
Comments:
cg.matmul is now named cg_matmul. The same rule applies to class names. For example, class cg.node is now named cg_node.name is removed. Names for nodes are now generated internally in the C-API.approx.gradients is no longer exported but still avaiable in the package namespace. Please note that this function is not well-optimized and should only be used for testing purposes.print on a cg_node object no longer prints the value of the node. Use function val to evaluate a node.New Features:
library which can be used to specify the function library that is used by the graph.val and set to retrieve or set the value of a node respectively.cg_mean now calls the base mean function.cg_crossprod and cg_tcrossprod now allow argument y to be missing (similarly as the corresponding base functions).dim of operator cg_reshape now expects an cg_node object instead of an integer scalar or vector that holds the new array dimensions.Bug Fixes:
Comments:
+ or - will have S3 overloaded methods.Bug Fixes:
sigmoid now correctly handles numerical underflow.cg.pmax and cg.pmin are now correctly differentiated when argument x and y are arrays.New Features:
!, ==, !=, <, >, <=, and >=.Bug Fixes:
run, gradients, and approx.grad no longer cause an infinite loop when member values of a cgraph object is supplied to the values argument of the functions.gradients which caused the R session to crash unexpectedly.approx.grad now checks whether node x and y evaluate to a numeric vector or array.approx.grad no longer changes the parent environment of argument values when the argument is an environment.Bug Fixes:
run and gradients no longer change the parent environment of argument values when the argument is an environment.name no longer generates a name that indicates the node type for performance reasons. Instead, it simply generates the name ‘node’ followed by the number of nodes that have been added to the graph.rchk.Comments:
New Features:
sinh and cosh.asinh and acosh.nodes of a cgraph object is now named to allow more convenient access to the symbols of the nodes in a graph.options(cg.autorun = FALSE).Bug Fixes:
cgraph object instead of coercing the object to a valid object.opr now ignores argument grads when its elements are not properly named.run now checks whether each node evaluates to a numeric vector or array.gradients now checks whether the node supplied to argument name evaluates to a numeric vector or array.get.parms and add.parms now correctly call the underlying C-API.Comments:
Comments: