Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new error, struct std::move error: #64

Open
xinsuinizhuan opened this issue Mar 30, 2020 · 6 comments
Open

new error, struct std::move error: #64

xinsuinizhuan opened this issue Mar 30, 2020 · 6 comments

Comments

@xinsuinizhuan
Copy link

xinsuinizhuan commented Mar 30, 2020

My struct,it does not supprot: m_pnetwork = std::move, now:
auto make_lstm_network() {
return bc::nn::neuralnetwork(
bc::nn::lstm(bc::host_tag(), 96 * 10, 1024, bc::nn::adam),
bc::nn::lstm(bc::host_tag(), 1024, 512, bc::nn::adam),
bc::nn::lstm(bc::host_tag(), 512, 216, bc::nn::adam),
bc::nn::feedforward(bc::host_tag(), 216, 192),
bc::nn::logistic(bc::host_tag(), 192),
bc::nn::logging_output_layer(bc::host_tag(), 192, bc::nn::RMSE).skip_every(100)
);
}
using network_type = decltype(make_lstm_network());

typedef struct _LstmPredictTask {
int m_batch_size;
double m_learning_rate;
network_type m_pnetwork = make_lstm_network();
void reset_neural_network() {
m_pnetwork = std::move(make_lstm_network());
}
} LstmPredictTask;
error:
图片

@josephjaspers
Copy link
Owner

Sorry for not replying recently, I have a lot more time so I will be trying to fix all of these soon!

@josephjaspers
Copy link
Owner

Just an update:

I am currently working on the project though I am splitting my time between two projects now:
https://github.com/josephjaspers/Robinhood

I am currently working on a redesign of some parts of the Tensor, and later the neural network.
I imagine this will take some time. I was able to get the above code to compile on linux.

I am going to try and get a virtual machine for Windows so I can more consistently test changes on windows.

Thanks for your patience.

@xinsuinizhuan
Copy link
Author

Oh, No. The two problem is also error.
1、in feedforward.h file:
图片
if i use the value_type like above for feedforward code, it is ok:
template<class SystemTag, class Optimizer = nn_default_optimizer_type>
auto feedforward(int inputs, int outputs, Optimizer=Optimizer()) {
using system_tag = BLACKCAT_DEFAULT_SYSTEM_T;
using value_type = typename SystemTag::default_floating_point_type;
return FeedForward<system_tag, value_type, Optimizer>(inputs, outputs);
}

2、it still don't support : m_pnetwork = std::move, now:
图片

@josephjaspers
Copy link
Owner

(Hopefully) fixed as of
e7bfd8d

Made some other changes to remove most warnings as well.

@xinsuinizhuan
Copy link
Author

xinsuinizhuan commented Apr 15, 2020

(Hopefully) fixed as of
e7bfd8d

Made some other changes to remove most warnings as well.

still not support m_pnetwork = std::move(make_lstm_network()):
auto make_lstm_network() {
return bc::nn::neuralnetwork(
bc::nn::lstm(bc::host_tag(), 96 * 10, 1024, bc::nn::adam),
bc::nn::lstm(bc::host_tag(), 1024, 512, bc::nn::adam),
bc::nn::lstm(bc::host_tag(), 512, 216, bc::nn::adam),
bc::nn::feedforward(bc::host_tag(), 216, 192),
bc::nn::logistic(bc::host_tag(), 192),
bc::nn::logging_output_layer(bc::host_tag(), 192, bc::nn::RMSE).skip_every(100)
);
}
using network_type = decltype(make_lstm_network());

typedef struct _LstmPredictTask {
network_type m_pnetwork = make_lstm_network(); //检测网络Net
void reset_neural_network() {
m_pnetwork = std::move(make_lstm_network());
}
} LstmPredictTask;
std::move(make_lstm_network()) can not assign to m_pnetwork

图片

@josephjaspers
Copy link
Owner

I was able to replicate the error and have fixed it here:
6f8f703

I've added some tests to cover this bug as well!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants