* Adding Collector for handling data sampling/collection before dataset/dataloader
* Modify domain by adding sample_mode, variables as property * Small change concatenate -> cat in lno/avno * Create different factory classes for conditions
This commit is contained in:
committed by
Nicola Demo
parent
aef5a5d590
commit
1bd3f40f54
@@ -1,7 +1,7 @@
|
||||
"""Module Averaging Neural Operator."""
|
||||
|
||||
import torch
|
||||
from torch import nn, concatenate
|
||||
from torch import nn, cat
|
||||
from .layers import AVNOBlock
|
||||
from .base_no import KernelNeuralOperator
|
||||
from pina.utils import check_consistency
|
||||
@@ -110,9 +110,9 @@ class AveragingNeuralOperator(KernelNeuralOperator):
|
||||
"""
|
||||
points_tmp = x.extract(self.coordinates_indices)
|
||||
new_batch = x.extract(self.field_indices)
|
||||
new_batch = concatenate((new_batch, points_tmp), dim=-1)
|
||||
new_batch = cat((new_batch, points_tmp), dim=-1)
|
||||
new_batch = self._lifting_operator(new_batch)
|
||||
new_batch = self._integral_kernels(new_batch)
|
||||
new_batch = concatenate((new_batch, points_tmp), dim=-1)
|
||||
new_batch = cat((new_batch, points_tmp), dim=-1)
|
||||
new_batch = self._projection_operator(new_batch)
|
||||
return new_batch
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
"""Module LowRank Neural Operator."""
|
||||
|
||||
import torch
|
||||
from torch import nn, concatenate
|
||||
from torch import nn, cat
|
||||
|
||||
from pina.utils import check_consistency
|
||||
|
||||
@@ -145,4 +145,4 @@ class LowRankNeuralOperator(KernelNeuralOperator):
|
||||
for module in self._integral_kernels:
|
||||
x = module(x, coords)
|
||||
# projecting
|
||||
return self._projection_operator(concatenate((x, coords), dim=-1))
|
||||
return self._projection_operator(cat((x, coords), dim=-1))
|
||||
|
||||
Reference in New Issue
Block a user