mirror of
https://github.com/CTCaer/waifu2x-caffe.git
synced 2025-03-01 14:27:12 +00:00
Update models for latest caffe master
waifu2x-caffe(CUI) works on ubuntu. # Conflicts: # .gitignore
This commit is contained in:
parent
5a7ac06f52
commit
2dbf72d191
@ -1,9 +1,10 @@
|
||||
name: "srcnn"
|
||||
input: "input"
|
||||
input_dim: 1
|
||||
input_dim: 1
|
||||
input_dim: 142
|
||||
input_dim: 142
|
||||
layer {
|
||||
name: "input"
|
||||
type: "Input"
|
||||
top: "input"
|
||||
input_param { shape: { dim: 1 dim: 1 dim: 142 dim: 142 } }
|
||||
}
|
||||
layer {
|
||||
name: "conv1_layer"
|
||||
type: "Convolution"
|
||||
|
@ -1,9 +1,10 @@
|
||||
name: "srcnn"
|
||||
input: "input"
|
||||
input_dim: 1
|
||||
input_dim: 3
|
||||
input_dim: 142
|
||||
input_dim: 142
|
||||
layer {
|
||||
name: "input"
|
||||
type: "Input"
|
||||
top: "input"
|
||||
input_param { shape: { dim: 1 dim: 3 dim: 142 dim: 142 } }
|
||||
}
|
||||
layer {
|
||||
name: "conv1_layer"
|
||||
type: "Convolution"
|
||||
|
@ -1,9 +1,10 @@
|
||||
name: "srcnn"
|
||||
input: "input"
|
||||
input_dim: 1
|
||||
input_dim: 3
|
||||
input_dim: 142
|
||||
input_dim: 142
|
||||
layer {
|
||||
name: "input"
|
||||
type: "Input"
|
||||
top: "input"
|
||||
input_param { shape: { dim: 1 dim: 3 dim: 142 dim: 142 } }
|
||||
}
|
||||
layer {
|
||||
name: "conv1_layer"
|
||||
type: "Convolution"
|
||||
|
@ -1,9 +1,10 @@
|
||||
name: "srcnn"
|
||||
input: "input"
|
||||
input_dim: 1
|
||||
input_dim: 3
|
||||
input_dim: 142
|
||||
input_dim: 142
|
||||
layer {
|
||||
name: "input"
|
||||
type: "Input"
|
||||
top: "input"
|
||||
input_param { shape: { dim: 1 dim: 3 dim: 142 dim: 142 } }
|
||||
}
|
||||
layer {
|
||||
name: "conv1_layer"
|
||||
type: "Convolution"
|
||||
|
@ -715,7 +715,7 @@ Waifu2x::eWaifu2xError Waifu2x::ConstractNet(boost::shared_ptr<caffe::Net<float>
|
||||
net = boost::shared_ptr<caffe::Net<float>>(new caffe::Net<float>(param_model));
|
||||
net->CopyTrainedLayersFrom(param_caffemodel);
|
||||
|
||||
input_plane = param_model.input_dim(1);
|
||||
input_plane = param_model.layer(0).input_param().shape().Get(0).dim(1);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -732,14 +732,13 @@ Waifu2x::eWaifu2xError Waifu2x::SetParameter(caffe::NetParameter ¶m, const s
|
||||
param.mutable_state()->set_phase(caffe::TEST);
|
||||
|
||||
{
|
||||
auto mid = param.mutable_input_dim();
|
||||
|
||||
if (mid->size() != 4)
|
||||
auto input_layer = param.mutable_layer(0);
|
||||
auto mid = input_layer->mutable_input_param()->mutable_shape();
|
||||
if (mid->size() > 0 && mid->Mutable(0)->dim_size() != 4)
|
||||
return eWaifu2xError_FailedParseModelFile;
|
||||
|
||||
*mid->Mutable(0) = batch_size;
|
||||
*mid->Mutable(2) = input_block_size;
|
||||
*mid->Mutable(3) = input_block_size;
|
||||
mid->Mutable(0)->set_dim(0, batch_size);
|
||||
mid->Mutable(0)->set_dim(2, input_block_size);
|
||||
mid->Mutable(0)->set_dim(3, input_block_size);
|
||||
}
|
||||
|
||||
for (int i = 0; i < param.layer_size(); i++)
|
||||
|
Loading…
x
Reference in New Issue
Block a user