Unknown input/output type: %s of type %s.
Package:
torch
50580

Exception Class:
TypeError
Raise code
rectified.append(blob)
else:
raise TypeError(
"I/O blob #{} of unsupported type: {} of type {}"
.format(len(rectified), str(blob), type(blob)))
return rectified
else:
raise TypeError(
"Unknown input/output type: %s of type %s." %
(str(blobs), type(blobs))
)
def CreateOperator(
operator_type,
inpu
Links to the raise (1)
https://github.com/pytorch/pytorch/blob/e56d3b023818f54553f2dc5d30b6b7aaf6b6a325/caffe2/python/core.py#L357Ways to fix
Error code:
from caffe2.python import core
op = core.CreateOperator(
"GaussianFill",
5, #Error occurs because of 5 is integer
["Z"],
shape=[100, 100], # shape argument as a list of ints.
mean=1.0, # mean as a single float
std=1.0, # std as a single float
)
print(str(op))
CreateOperator gets string,binary,list, tuple as an input/output arguments. In the above we try to assign an integer as an input, That's why we get an error.
Fix code:
from caffe2.python import core
op = core.CreateOperator(
"GaussianFill",
[], # GaussianFill does not need any parameters.
["Z"],
shape=[100, 100], # shape argument as a list of ints.
mean=1.0, # mean as a single float
std=1.0, # std as a single float
)
print(str(op))
Add a possible fix
Please authorize to post fix