def test_caffe_train(net): Caffe().train(net) assert len(net.weights()) > 0 print(net.weights()) assert net.iteration_of_weights(net.highest_iteration_weights()) == 1000
def test_caffe_test(net): caffe = Caffe() caffe.train(net) for w in net.weights(): assert caffe.test(net, w) > 0.96
def test_caffe_time(net): deploy_timings = Caffe().time(net, iterations=1) train_timings = Caffe().time(net, iterations=1, use_train_model=True) assert type(deploy_timings['avg_forward']) == float assert type(train_timings['avg_backward']) == float