mirror of
https://github.com/pjreddie/darknet.git
synced 2023-08-10 21:13:14 +03:00
Making a pointer version of network_predict for python.
The python binding requires the network struct to be passed as a pointer to it rather than a struct copy.
This commit is contained in:
@ -556,6 +556,12 @@ void top_predictions(network net, int k, int *index)
|
||||
top_k(out, size, k, index);
|
||||
}
|
||||
|
||||
// A version of network_predict that uses a pointer for the network
|
||||
// struct to make the python binding work properly.
|
||||
float *network_predict_ptr(network *net, float *input)
|
||||
{
|
||||
return network_predict(*net, input);
|
||||
}
|
||||
|
||||
float *network_predict(network net, float *input)
|
||||
{
|
||||
|
Reference in New Issue
Block a user