pymc-devs / pymc-devs/pytensor
`pool_2d` and `conv` from `pytensor.tensor.nnet` deprecated no documentation.
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 644
- Forks
- 208
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 16
Description
Description
Hi I knew using pytensor I had a code that was implemented using the old version of pytensor but now pytensor.tensor.nnet and pytensor.tensor.signal does not exits anymore I checked the documentation but it very old and it is based on a on Theano and I can't make this code to work could you please tell me that are the new submodules for pool_2d and conv
from pytensor.tensor.nnet import conv
from pytensor.tensor.signal.pool import pool_2d
#### Define layer types
class ConvPoolLayer(object):
"""Used to create a combination of a convolutional and a max-pooling
layer. A more sophisticated implementation would separate the
two, but for our purposes we'll always use them together, and it
simplifies the code, so it makes sense to combine them.
"""
# ... rest of the class
def set_inpt(self, inpt, inpt_dropout, mini_batch_size):
self.inpt = inpt.reshape(self.image_shape)
conv_out = conv.conv2d(input=self.inpt, filters=self.w, filter_shape=self.filter_shape, image_shape=self.image_shape)
pooled_out = pool_2d(input=conv_out, ws=self.poolsize, ignore_border=True)
self.output = self.activation_fn(
pooled_out + self.b.dimshuffle('x', 0, 'x', 'x'))
self.output_dropout = self.output # no dropout in the convolutional layers
This are the two calls the code does to the deprecated and old submodules:
conv_out = conv.conv2d(input=self.inpt, filters=self.w, filter_shape=self.filter_shape, image_shape=self.image_shape)
pooled_out = pool_2d(input=conv_out, ws=self.poolsize, ignore_border=True)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the issue's pytensor.tensor.nnet and pytensor.tensor.signal entry points and verify which current APIs replace conv and pool_2d. Update the relevant documentation with migration guidance for the two shown calls; done when users can identify supported imports and adapt this example without relying on the old Theano-based documentation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100