On Thursday, 14 July 2016 at 19:48:38 UTC, ag0aep6g wrote:
Make F an alias parameter:
struct Neurons_layer(T = float, size_t neurons_num = 0, alias F
= Sigmoid)
if(isFloatingPoint!T && is(typeof(F!T.Function)))
{
...
private:
alias Function = F!T.Function;
}
unittest
{
On Thursday, 14 July 2016 at 19:48:20 UTC, Lodovico Giaretta
wrote:
You don't need Sigmoid!float at all. This will work:
Neurons_layer!(float, 5) nf;
as you provided a default value for the third argument.
Yes, default init is present, but double, real types are desirable
On Thursday, 14 July 2016 at 19:28:23 UTC, Andrey wrote:
On Thursday, 14 July 2016 at 19:27:14 UTC, Andrey wrote:
[...]
struct Sigmoid(T)
{
[...]
}
struct Neurons_layer(T = float, size_t neurons_num = 0, F =
Sigmoid!T)
if(isFloatingPoint!T && is(typeof(F.Function)))
{
[...]
pri
On 7/14/16 3:28 PM, Andrey wrote:
On Thursday, 14 July 2016 at 19:27:14 UTC, Andrey wrote:
struct Neurons_layer(T = float, size_t neurons_num = 0, F = Sigmoid!T)
if(isFloatingPoint!T && is(typeof(F.Function)))
{
private:
static if(neurons_num > 0)
T[neurons_num] _neurons_ar
On Thursday, 14 July 2016 at 19:28:23 UTC, Andrey wrote:
On Thursday, 14 July 2016 at 19:27:14 UTC, Andrey wrote:
Hi guys!
Help a newbie please.
Playing with D and trying to understand some features.
Here is my try to carry out my code from C++ project to D
struct Sigmoid(T)
{
const T Funct
On Thursday, 14 July 2016 at 19:27:14 UTC, Andrey wrote:
Hi guys!
Help a newbie please.
Playing with D and trying to understand some features.
Here is my try to carry out my code from C++ project to D
struct Sigmoid(T)
{
const T Function(T value)
{
...
}
const T DerivateFunction(con
Hi guys!
Help a newbie please.
Playing with D and trying to understand some features.
Here is my try to carry out my code from C++ project to D
struct Sigmoid(T)
{
const T Function(T value)
{
...
}
const T DerivateFunction(const T value)
{
...
}
}
struct Neurons_layer(T = flo