Comments (4)
I have added an standalone ReLU function.
Regards
Ben
from sparseconvnet.
Using self.spatial_size= self.sparseModel.input_spatial_size(torch.LongTensor([1, 1]))
with scn.ReLU()
seems to cause torch.nn.modules.module.ModuleAttributeError: 'ReLU' object has no attribute 'input_spatial_size'
Error.
from sparseconvnet.
Update pushed, thanks.
from sparseconvnet.
I implemented a custom print layer to print the shape of the output. I also received the above error. The following is the implementation.
class PrintLayer(nn.Module):
def __init__(self):
super().__init__()
def forward(self, x ):
print(x.shape)
return x
model = scn.Sequential().add(
scn.SubmanifoldConvolution(3, 24, 32, 3, False)
).add(
PrintLayer()
).add(
scn.BatchNormReLU(32)
).to(device)
Upon initialising as shown in the example leads to
inputSpatialSize = model.input_spatial_size(torch.LongTensor([512, 512, 512]))
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-58-2f931c1817d2> in <module>
----> 1 inputSpatialSize = model.input_spatial_size(torch.LongTensor([512, 512, 512]))
~/anaconda3/envs/sparse_conv/lib/python3.6/site-packages/sparseconvnet-0.2-py3.6-linux-x86_64.egg/sparseconvnet/sequential.py in input_spatial_size(self, out_size)
11 def input_spatial_size(self, out_size):
12 for m in reversed(self._modules):
---> 13 out_size = self._modules[m].input_spatial_size(out_size)
14 return out_size
15
~/anaconda3/envs/sparse_conv/lib/python3.6/site-packages/torch/nn/modules/module.py in __getattr__(self, name)
574 return modules[name]
575 raise AttributeError("'{}' object has no attribute '{}'".format(
--> 576 type(self).__name__, name))
577
578 def __setattr__(self, name, value):
AttributeError: 'PrintLayer' object has no attribute 'input_spatial_size'
Is this error related to the previous problem pointed out ?
from sparseconvnet.
Related Issues (20)
- Some questions about operational efficiency
- About the parameters of InputLayer HOT 3
- Dense to Sparse for input is quite slow
- AttributeError: module 'sparseconvnet.SCN' has no attribute 'Metadata_2' HOT 3
- RuntimeError: CUDA error: an illegal memory access was encountered HOT 2
- voxel input HOT 1
- Cloning face an error
- undefined symbol: _ZNSt15__exception_ptr13exception_ptr10_M_releaseEv HOT 2
- How to compute FLOPs for spraseconvnet HOT 3
- RuntimeError: expected scalar type Long but found Float HOT 5
- Building failure related to gcc version
- RuntimeError: expected scalar type Long but found Float
- Dilated convolution HOT 1
- Directly applying convolution HOT 1
- Rewrite for convolution operation
- Output with empty tensor
- setup.py中的C++17要改成C++14
- question from paper HOT 2
- Segment Fault due to resolution
- RuntimeError: Error compiling objects for extension
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sparseconvnet.