Constructs a new TensorMetadata using information from the provided feed_dict. Args: feed_dict (OrderedDict[str, numpy.ndarray]): A mapping of input tensor names to corresponding input NumPy arrays. Returns: TensorMetadata
(feed_dict)
| 78 | |
| 79 | @staticmethod |
| 80 | def from_feed_dict(feed_dict): |
| 81 | """ |
| 82 | Constructs a new TensorMetadata using information from the provided feed_dict. |
| 83 | |
| 84 | Args: |
| 85 | feed_dict (OrderedDict[str, numpy.ndarray]): |
| 86 | A mapping of input tensor names to corresponding input NumPy arrays. |
| 87 | |
| 88 | Returns: |
| 89 | TensorMetadata |
| 90 | """ |
| 91 | meta = TensorMetadata() |
| 92 | for name, arr in feed_dict.items(): |
| 93 | meta.add(name, arr.dtype, arr.shape) |
| 94 | return meta |
| 95 | |
| 96 | def add(self, name, dtype, shape, min_shape=None, max_shape=None): |
| 97 | """ |
no test coverage detected